diff options
-rw-r--r-- | inc/infoutils.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php index 32baa9450..096662d24 100644 --- a/inc/infoutils.php +++ b/inc/infoutils.php @@ -265,17 +265,15 @@ function msg($message,$lvl=0,$line='',$file=''){ if($line || $file) $message.=' ['.basename($file).':'.$line.']'; - if(!headers_sent()){ - if(!isset($MSG)) $MSG = array(); - $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); - }else{ - $MSG = array(); - $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); + if(!isset($MSG)) $MSG = array(); + $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); + if(headers_sent()){ if(function_exists('html_msgarea')){ html_msgarea(); }else{ print "ERROR($lvl) $message"; } + unset($GLOBALS['MSG']); } } |