Skip to content

Fatal errors not logged to stderr with certain flags #6963

@ldct

Description

@ldct

HHVM Version

3.12.1

Standalone code, or other way to reproduce the problem

> cat ./fatal.php 
<?php
float(1);

Also make sure the file /var/log/php/phperrors.log exists

Expected result

Running

php -c /dev/null -d log_errors=1 -d display_errors=1 -d error_log=/var/log/php/phperrors.log ./fatal.php

Writes the following to stdout or stderr

Warning: main(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /opt/jenkins/workspace/jobs/Quizlet-HHVM-PHPUnit/workspace/fatal.php on line 3

Fatal error: Call to undefined function float() in /opt/jenkins/workspace/jobs/Quizlet-HHVM-PHPUnit/workspace/fatal.php on line 3

and writes the following to the error log:

[04-Apr-2016 21:52:51 UTC] PHP Fatal error:  Call to undefined function float() in /opt/jenkins/workspace/jobs/Quizlet-HHVM-PHPUnit/workspace/fatal.php on line 3

Actual result

Running

hhvm -c /dev/null -d log_errors=1 -d display_errors=1 -d error_log=/var/log/php/phperrors.log ./fatal.php

Running with hhvm produces nothing on stdout/stderr and writes the following to the error log:

Fatal error: Call to undefined function float() in /opt/jenkins/workspace/jobs/Quizlet-HHVM-PHPUnit/workspace/fatal.php on line 3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions