>After upgrading to Red Hat Linux 7.3 (which also includes a new PHP
>version), I saw this warning (Uninitialized string offset) on my apache
>error log files. It refers to a line which was perfectly legal before:
The new settings in php.ini are error_reporting E_ALL by default.
Those errors have always been there, have always been generated, and you've
been "ignoring" them.
> if
>(isset($GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName']))
>
>I always use isset to check if a variable is defined. Do you know why I
>get this warning?
Best Guess:
PHP is only checking if the *LAST* array reference "isset" -- and to do
that, *has* to assume that the others are there -- IE, that
$GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER'] is set...
Change it to this:
if (isset($GLOBALS['SPEEDY_GLOBAL_VARS'] &&
$GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER'] &&
$GLOBALS['SPEEDY_GLOBAL_VARS']['CURRENT_USER']['UserName']){
--
Like Music? http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php