Open ldct opened 8 years ago
In my experience, not only fatal errors, also notices, warnings are displayed etc:
# /etc/hhvm/php.ini
display_errors=0
<?php
# test.php
echo ini_get('display_errors') . "\n";
ini_set('display_errors', 0);
$arr = [];
echo $arr['test'];
echo ini_get('display_errors') . "\n";
Sample output:
1
Notice: Undefined index: test in test.php on line 6
0
Expected output:
0
0
fredemmott-fb:hhtest fredemmott$ echo '<?php var_dump(ini_get("display_errors"));' | hhvm -ddisplay_errors=0 /dev/stdin
<jemalloc>: Invalid conf pair: metadata_thp:false
string(1) "1"
fredemmott-fb:hhtest fredemmott$ echo '<?php var_dump(ini_get("display_errors"));' | hhvm -ddisplay_errors=stdout /dev/stdin
<jemalloc>: Invalid conf pair: metadata_thp:false
string(6) "stdout"
fredemmott-fb:hhtest fredemmott$ echo '<?php var_dump(ini_get("display_errors"));' | hhvm -ddisplay_errors=off /dev/stdin
<jemalloc>: Invalid conf pair: metadata_thp:false
string(1) "1"
fredemmott-fb:hhtest fredemmott$ echo '<?php var_dump(ini_get("display_errors"));' | hhvm -ddisplay_errors=0 /dev/stdin
<jemalloc>: Invalid conf pair: metadata_thp:false
string(1) "1"
fredemmott-fb:hhtest fredemmott$ echo '<?php var_dump(ini_get("display_errors"));' | hhvm -ddisplay_errors=stderr /dev/stdin
<jemalloc>: Invalid conf pair: metadata_thp:false
string(6) "stderr"
HHVM Version
3.12.0
Standalone code, or other way to reproduce the problem
Expected result
The
-d display_errors=0
flag should have set thedisplay_errors directive
to 0, soini_get('display_errors')
should return "0". Also, the fatal error should not be printed.What zend does:
Actual result
ini_get('display_errors')
returns"1"
and fatal error is displayedAlso, it seems that it always return
"1"
no matter how I try to set it to off (in zend that includes =false, =0, =Off, ='', ="")