"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "framework/base/CApplication.php" between
yii-1.1.23.445827.tar.gz and yii-1.1.24.a5ab20.tar.gz

About: Yii is a high-performance component-based PHP framework for developing large-scale Web applications. Hint: Yii 1.1 is now in maintenance mode.

CApplication.php  (yii-1.1.23.445827):CApplication.php  (yii-1.1.24.a5ab20)
skipping to change at line 804 skipping to change at line 804
public function handleError($code,$message,$file,$line) public function handleError($code,$message,$file,$line)
{ {
if($code & error_reporting()) if($code & error_reporting())
{ {
// disable error capturing to avoid recursive errors // disable error capturing to avoid recursive errors
restore_error_handler(); restore_error_handler();
restore_exception_handler(); restore_exception_handler();
$log="$message ($file:$line)\nStack trace:\n"; $log="$message ($file:$line)\nStack trace:\n";
$trace=debug_backtrace(); $trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error array_shift($trace);
position
if(count($trace)>3)
$trace=array_slice($trace,3);
foreach($trace as $i=>$t) foreach($trace as $i=>$t)
{ {
if(!isset($t['file'])) if(!isset($t['file']))
$t['file']='unknown'; $t['file']='unknown';
if(!isset($t['line'])) if(!isset($t['line']))
$t['line']=0; $t['line']=0;
if(!isset($t['function'])) if(!isset($t['function']))
$t['function']='unknown'; $t['function']='unknown';
$log.="#$i {$t['file']}({$t['line']}): "; $log.="#$i {$t['file']}({$t['line']}): ";
if(isset($t['object']) && is_object($t['object']) ) if(isset($t['object']) && is_object($t['object']) )
skipping to change at line 909 skipping to change at line 907
*/ */
public function displayError($code,$message,$file,$line) public function displayError($code,$message,$file,$line)
{ {
if(YII_DEBUG) if(YII_DEBUG)
{ {
echo "<h1>PHP Error [$code]</h1>\n"; echo "<h1>PHP Error [$code]</h1>\n";
echo "<p>$message ($file:$line)</p>\n"; echo "<p>$message ($file:$line)</p>\n";
echo '<pre>'; echo '<pre>';
$trace=debug_backtrace(); $trace=debug_backtrace();
// skip the first 3 stacks as they do not tell the error // skip the first 2 stacks as they are always irrelevant
position if(count($trace)>2)
if(count($trace)>3) $trace=array_slice($trace,2);
$trace=array_slice($trace,3);
foreach($trace as $i=>$t) foreach($trace as $i=>$t)
{ {
if(!isset($t['file'])) if(!isset($t['file']))
$t['file']='unknown'; $t['file']='unknown';
if(!isset($t['line'])) if(!isset($t['line']))
$t['line']=0; $t['line']=0;
if(!isset($t['function'])) if(!isset($t['function']))
$t['function']='unknown'; $t['function']='unknown';
echo "#$i {$t['file']}({$t['line']}): "; echo "#$i {$t['file']}({$t['line']}): ";
if(isset($t['object']) && is_object($t['object']) ) if(isset($t['object']) && is_object($t['object']) )
 End of changes. 2 change blocks. 
8 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)