diff options
author | Brant Messenger <brantmessenger@users.noreply.github.com> | 2017-06-18 18:16:17 -0500 |
---|---|---|
committer | Jordi Boggiano <j.boggiano@seld.be> | 2017-06-19 01:16:17 +0200 |
commit | 1b769912d1d7f1c6ed8b17de7a9aee9ba3fe92b0 (patch) | |
tree | 13753a6d15e171827bc39f01d9a676e9ca52042b /src | |
parent | 120499283b972bb4bd8870b5c4e02a3ce9252c35 (diff) | |
download | monolog-1b769912d1d7f1c6ed8b17de7a9aee9ba3fe92b0.zip monolog-1b769912d1d7f1c6ed8b17de7a9aee9ba3fe92b0.tar.gz monolog-1b769912d1d7f1c6ed8b17de7a9aee9ba3fe92b0.tar.bz2 |
PHP Versions less than 5.3.6 throws undefined constant DEBUG_BACKTRAC… (#986)
* PHP Versions less than 5.3.6 throws undefined constant DEBUG_BACKTRACE_IGNORE_ARGS
Notice: Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in /vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php on line 58
* Define DEBUG_BACKTRACE_IGNORE_ARGS if not defined.
* Solution using PHP_VERSION_ID and not defining...
...DEBUG_BACKTRACE_IGNORE_ARGS
Diffstat (limited to 'src')
-rw-r--r-- | src/Monolog/Processor/IntrospectionProcessor.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Monolog/Processor/IntrospectionProcessor.php b/src/Monolog/Processor/IntrospectionProcessor.php index 2691630..2c07cae 100644 --- a/src/Monolog/Processor/IntrospectionProcessor.php +++ b/src/Monolog/Processor/IntrospectionProcessor.php @@ -55,7 +55,12 @@ class IntrospectionProcessor return $record; } - $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + /* + * http://php.net/manual/en/function.debug-backtrace.php + * As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. + * Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. + */ + $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); // skip first since it's always the current method array_shift($trace); |