Supporting benchmark for PHP 5.3 < 5.3.6
authorAlexander Ebert <ebert@woltlab.com>
Sat, 27 Oct 2012 20:01:43 +0000 (22:01 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 27 Oct 2012 20:01:43 +0000 (22:01 +0200)
wcfsetup/install/files/lib/system/benchmark/Benchmark.class.php

index aa20ce5bfe19a2a352e7b5a0ed848859109285c5..d8a1c4911a77712c8350010c8f74bce59d5ad936 100644 (file)
@@ -61,7 +61,7 @@ class Benchmark extends SingletonFactory {
                $this->items[$newIndex]['type'] = $type;
                $this->items[$newIndex]['before'] = self::getMicrotime();
                $this->items[$newIndex]['start'] = self::compareMicrotimes($this->startTime, $this->items[$newIndex]['before']);
-               $this->items[$newIndex]['trace'] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
+               $this->items[$newIndex]['trace'] = (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) ? debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) : debug_backtrace();
                return $newIndex;
        }