Skip to content

Commit efb7496

Browse files
committed
enhanced test option
1 parent 1b749c1 commit efb7496

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/007-php-errormsg.phpt

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ if ( ! extension_loaded ('magic') ) {
99
--POST--
1010
--GET--
1111
--INI--
12+
track_errors=1
1213
--FILE--
1314
<?php
1415

@@ -17,7 +18,10 @@ if ( version_compare (PHP_VERSION, '7.2.0', '>=') ) {
1718
echo "modules/magic.so1 file not found.";
1819
} else {
1920
if ( filemagic ('modules/magic.so1') == false ) {
20-
ini_set ('track_errors', true);
21+
if ( ! ini_get ('track_errors') ) {
22+
echo "track_errors is disable. To fix, enable track_errors ini option\n";
23+
exit;
24+
}
2125
echo $php_errormsg . "\n";
2226
}
2327
}

0 commit comments

Comments
 (0)