Make examples fail on any PHP diagnostic
Previously we called set_error_handler() in tests.php to do this, but that only sets it for the test-suite. Now we set it in on the PHP command line, which works for both.
This commit is contained in:
parent
e22dd47ff5
commit
d6f9f4b6c0
3 changed files with 1 additions and 14 deletions
|
|
@ -1,16 +1,5 @@
|
|||
<?php
|
||||
|
||||
function die_on_error($errno, $errstr, $file, $line) {
|
||||
if ($file !== Null) {
|
||||
print $file;
|
||||
if ($line !== Null) print ":$line";
|
||||
print ": ";
|
||||
}
|
||||
print "$errstr\n";
|
||||
exit(1);
|
||||
}
|
||||
set_error_handler("die_on_error", -1);
|
||||
|
||||
$_original_functions=get_defined_functions();
|
||||
$_original_globals=1;
|
||||
$_original_classes=get_declared_classes();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue