facebook / facebook/hhvm

ini_get('display_errors') always returns '1'

Open
#6,967 2 comments 1 reaction 0 assignees View on GitHub
php5 incompatibility probably easy
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

### HHVM Version

3.12.0
### Standalone code, or other way to reproduce the problem

```
➜ hhvm -c /dev/null -d display_errors=0 -m debug
Welcome to HipHop Debugger!
Type "help" or "?" for a complete list of commands.

Note: no server specified, debugging local scripts only.
If you want to connect to a server, launch with "-h" or use:
[m]achine [c]onnect

hphpd> p float(1);
p float(1);
Hit fatal : Call to undefined function float()
#0 at [:1]
#1 include(), called at [:1]

null
hphpd> p ini_get('display_errors');
p ini_get('display_errors');
"1"
hphpd> ^Dquit
```
### Expected result

The `-d display_errors=0` flag should have set the `display_errors directive` to 0, so `ini_get('display_errors')` should return "0". Also, the fatal error should not be printed.

What zend does:

```
➜ php -c /dev/null -d display_errors=0 -a
Interactive shell

php > float(1);
php > var_dump(ini_get('display_errors'));
string(0) "0"
```
### Actual result

`ini_get('display_errors')` returns `"1"` and fatal error is displayed

Also, it seems that it always return `"1"` no matter how I try to set it to off (in zend that includes =false, =0, =Off, ='', ="")

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.