Little bug, error_reporting

support forum

Little bug, error_reporting

Postby teuzzo » Tue May 05, 2009 10:53 am

At the first access the array $_COOKIE does not exists and if you have error_reporting=E_ALL, there is a notice:

Notice: Undefined index: leonardo_user_prefs in /var/www/.../modules/leonardo/CL_user_prefs.php on line 36

To correct this little bug, on line 36 of the file CL_user_prefs.php you have to sobstiute

Code: Select all
$cval=$_COOKIE['leonardo_user_prefs']; // to do: verify existance first!


with this

Code: Select all
if( isset($_COOKIE['leonardo_user_prefs']) ) $cval=$_COOKIE['leonardo_user_prefs'];   // to do: verify existance first!
else $cval=null;
teuzzo
 
Posts: 3
Joined: Mon Dec 01, 2008 12:38 pm

Postby manolis » Tue May 05, 2009 12:32 pm

thx for the fix !

I'm surprised this is the only "notice", I think there are quite a few other cases in the code that would bring up "notices"
manolis
Site Admin
 
Posts: 152
Joined: Fri Jun 24, 2005 2:04 pm

Postby teuzzo » Tue May 05, 2009 6:18 pm

Yes, this is another notice:

Notice: import_request_variables() [function.import-request-variables]: No prefix specified - possible security hazard in .../mainfile.php on line 49

I put the comment in the file mainfile.php here:

Code: Select all
/*
if (!ini_get("register_globals")) {
    import_request_variables('GPC');
}
*/


My installation now works.
If i will find other notice, i will write here.[/b]
teuzzo
 
Posts: 3
Joined: Mon Dec 01, 2008 12:38 pm


Return to Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron
Bridge by mehdiplugins.com