Made the error handler behave responsibly when $user isn't there yet

git-svn-id: file:///svn/phpbb/trunk@3092 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Bart van Bragt 2002-11-25 18:32:36 +00:00
parent 0f31aa8416
commit efad1f2491

View file

@ -797,6 +797,15 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
break;
case E_USER_NOTICE:
// 20021125 Bartvb (todo)
// This is a hack just to show something useful.
// $msg_text won't contain anything if $user isn't there yet.
// I ran into this problem when installing without makeing config_cache.php writable
if ( !class_exists($user) )
{
die("Unable to show notice, \$user class hasn't been instantiated yet.<br />Error triggered in: " . $errfile .":". $errline);
}
if (empty($user->session_id))
{
$user->start();