#47486 [Com]: No message displayed for parse errors in included files
| From: | amelek32 at gmail dot com | Date: | Tue, 24 Feb 2009 18:18:19 +0000 |
| Subject: | #47486 [Com]: No message displayed for parse errors in included files | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134174@lists.php.net to get a copy of this message | ||
ID: 47486
Comment by: amelek32 at gmail dot com
Reported By: a at a dot com
Status: Verified
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.*, 6CVS (2009-02-24)
New Comment:
error_reporting(E_ALL & E_NOTICE);
i believe you mean
error_reporting(E_ALL | E_NOTICE);
your code is equivalent to
error_reporting(E_NOTICE);
error thrown is fatal so it's ignored in such error reporting.
Previous Comments:
------------------------------------------------------------------------
[2009-02-24 10:42:13] jani@php.net
Verified using CLI. Errors are displayed correctly when the
error_reporting() call is commented out from the main.php
------------------------------------------------------------------------
[2009-02-24 02:35:09] a at a dot com
Description:
------------
(I'm using IIS, ISAPI)
When there is a parse error in an included file, NO error is displayed
even if display_errors and error_reporting are set correctly.
Reproduce code:
---------------
--main.php--
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL & E_NOTICE);
include("inc.php");
?>
------------
--inc.php--
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL & E_NOTICE);
$testvar = ;
?>
-----------
Expected result:
----------------
Parse error: parse error in [path here]\inc.php on line 4
Actual result:
--------------
None, there is no output at all, and no error gets logged.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47486&edit=1