summaryrefslogtreecommitdiffstats
path: root/application/third_party/test-more-php/Test-Simple-OO.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/third_party/test-more-php/Test-Simple-OO.php')
-rwxr-xr-xapplication/third_party/test-more-php/Test-Simple-OO.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/application/third_party/test-more-php/Test-Simple-OO.php b/application/third_party/test-more-php/Test-Simple-OO.php
index 1d33eff2e..9bbe4aada 100755
--- a/application/third_party/test-more-php/Test-Simple-OO.php
+++ b/application/third_party/test-more-php/Test-Simple-OO.php
@@ -154,10 +154,14 @@ class TestSimple {
} else {
echo $this->LastFail = "not ok $title\n";
- $stack = isset($this->Backtrace) ? $this->Backtrace : debug_backtrace();
- $call = array_pop($stack);
- $file = basename($call['file']);
- $line = $call['line'];
+ $stack = isset($this->Backtrace) ? $this->Backtrace : debug_backtrace();
+ foreach (array_reverse($stack) as $frame) {
+ if (isset($frame["object"]) && $frame["object"] == $this) {
+ $file = $frame["file"];
+ $line = $frame["line"];
+ break;
+ }
+ }
unset($this->Backtrace);
if ($caption) {