shikin Posted July 22, 2008 Share Posted July 22, 2008 can someone help me?? currently i'm develop a website using joomla..but then i've got this "notice" this is the coding from sgmenu.php <ul> <?php $item_id = (int) mosGetParam($_REQUEST, 'Itemid', 0); $qry = "SELECT id, name, link FROM #__menu WHERE menutype='mainmenu' and parent='0' AND access<='$gid' AND sublevel='0' AND published='1' ORDER BY ordering LIMIT 10"; $database->setQuery($qry); $rows = $database->loadObjectList(); foreach($rows as $row) { echo "<li><a href='$row->link&Itemid=$row->id' ".( $row->id == $item_id ? "class='current'" : "" )." ><span>$row->name</span></a></li>"; } ?> </ul> how can i correct this problem?? Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/ Share on other sites More sharing options...
mmarif4u Posted July 22, 2008 Share Posted July 22, 2008 Edit your php.ini, find this line ;error_reporting = E_ALL & ~E_NOTICE and uncomment it like this error_reporting = E_ALL & ~E_NOTICE This will still show all errors and turn off notices If you don't want to turn off notices for everything you can add this code to the top of your index.php <?php error_reporting(0); ?> Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596270 Share on other sites More sharing options...
shikin Posted July 22, 2008 Author Share Posted July 22, 2008 error_reporting = E_ALL & ~E_NOTICE it's already uncomment..but the notice still come out Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596340 Share on other sites More sharing options...
mmarif4u Posted July 22, 2008 Share Posted July 22, 2008 Did you restart your server. BTW are you from Malaysia? Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596342 Share on other sites More sharing options...
shikin Posted July 22, 2008 Author Share Posted July 22, 2008 i already restart it..yup..i'm from malaysia Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596365 Share on other sites More sharing options...
mmarif4u Posted July 22, 2008 Share Posted July 22, 2008 OK,no luck after restart. did you tried this: <?php error_reporting(0); ?> Oh,you are also from Malaysia.Just got another person also here now in this forum from Malaysia. Anyway welcome. I am also in Malaysia,not local. Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596367 Share on other sites More sharing options...
wildteen88 Posted July 22, 2008 Share Posted July 22, 2008 Disabling error_reporting or lowering the error level doesn't fix the issue. The problem is still there. can someone help me?? currently i'm develop a website using joomla..but then i've got this "notice" this is the coding from sgmenu.php <ul> <?php $item_id = (int) mosGetParam($_REQUEST, 'Itemid', 0); $qry = "SELECT id, name, link FROM #__menu WHERE menutype='mainmenu' and parent='0' AND access<='$gid' AND sublevel='0' AND published='1' ORDER BY ordering LIMIT 10"; $database->setQuery($qry); $rows = $database->loadObjectList(); foreach($rows as $row) { echo "<li><a href='$row->link&Itemid=$row->id' ".( $row->id == $item_id ? "class='current'" : "" )." ><span>$row->name</span></a></li>"; } ?> </ul> how can i correct this problem?? The problem is to do with the $gid variable. Where is this variable defined? Quote Link to comment https://forums.phpfreaks.com/topic/115973-ive-got-notice/#findComment-596710 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.