mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
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:
parent
0f31aa8416
commit
efad1f2491
1 changed files with 10 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue