JosephLenton / PHP-Error

Better error reporting for PHP, and prettier too!
1.35k stars 151 forks source link

Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS #16

Closed sattes-faction closed 12 years ago

sattes-faction commented 12 years ago

I followed your simple example with:

require('library/php_error/php_error.php');
\php_error\reportErrors();

right on top of my bootstrap-file in my project. I then just ran reloaded the start page of my project (which doesn't produce an error so far) to check and got a notice message saying:

Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' in     ../php_error.php on line 2460

I run PHP 5.3.3.

meigwilym commented 12 years ago

Me and the other developer here has had the exact same error today.

He had the error because of some genuine error in his code. I called an undeclared function in the first line of my index and it threw the same as above. Running PHP 5.3.3 on xampp

JosephLenton commented 12 years ago

This should now be fixed.

DEBUG_BACKTRACE_IGNORE_ARGS is an option that was added in 5.3.6, which is why it isn't found for you. Now it'll just not use that option, if it's not there.

It's used to make backtraces slightly faster, by not bothering to provide you any of the arguments on the stack.

sattes-faction commented 12 years ago

Thanks Joseph for clarifying and fixing this!