Skip to content

Commit

Permalink
Merge pull request #448 from lunika/master
Browse files Browse the repository at this point in the history
fix #446 issue, search good call to log method in ConnectionWrapper
  • Loading branch information
willdurand committed Sep 30, 2013
2 parents c2f86f5 + c887ab1 commit fb9a109
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Propel/Runtime/Connection/ConnectionWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,14 @@ public function log($msg)
if (!isset($backtrace[1]['function'])) {
return;
}
$callingMethod = $backtrace[1]['function'];

$i = 1;
$stackSize = count($backtrace);
do {
$callingMethod = $backtrace[$i]['function'];
$i++;
} while($callingMethod == "log" && $i < $stackSize);

if (!$msg || !$this->isLogEnabledForMethod($callingMethod)) {
return;
}
Expand Down

0 comments on commit fb9a109

Please sign in to comment.