Permalink
Browse files

Make getFixedTrace() also fix traces without file #1572

AgaviException::getFixedTrace() now also fixes empty traces and traces with a missing file entry
  • Loading branch information...
thomasbachem committed Jan 12, 2016
1 parent 106c1b2 commit 7ca6e5df9c85e216f7a96d81b069223a71c487e9
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +1 −1 src/exception/AgaviException.class.php
View
@@ -70,6 +70,7 @@ CHG: Make AgaviReturnArrayConfigHandler an AgaviXmlConfigHandler and add namespa
CHG: Move loading of autoload.xml into Agavi::bootstrap() (#1206) (David)
CHG: Add response to default template assigns (#1095) (David)
CHG: Move all includes necessary for startup from Agavi::boostrap() into agavi.php (#1094) (David)
+CHG: AgaviException::getFixedTrace() now also fixes empty traces and traces with a missing file entry (#1572) (Thomas Bachem)
FIX: Fix/remove unused/undefined variables and properties in the codebase (#1483) (Thomas Bachem)
FIX: Fix AgaviGregorianCalendar::pinDayOfMonth() (#1543) (Thomas Bachem)
@@ -72,7 +72,7 @@ public static function getFixedTrace(Exception $e, Exception $next = null)
// fix stack trace in case it doesn't contain the exception origin as the first entry
$fixedTrace = $e->getTrace();
- if(isset($fixedTrace[0]['file']) && !($fixedTrace[0]['file'] == $e->getFile() && $fixedTrace[0]['line'] == $e->getLine())) {
+ if(!isset($fixedTrace[0]['file']) || !($fixedTrace[0]['file'] == $e->getFile() && $fixedTrace[0]['line'] == $e->getLine())) {
$fixedTrace = array_merge(array(array('file' => $e->getFile(), 'line' => $e->getLine())), $fixedTrace);
}

0 comments on commit 7ca6e5d

Please sign in to comment.