#33637 [Opn]: include fails on parse error
| From: | michal at cihar dot com | Date: | Sun, 10 Jul 2005 22:09:02 +0000 |
| Subject: | #33637 [Opn]: include fails on parse error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-81651@lists.php.net to get a copy of this message | ||
ID: 33637
User updated by: michal at cihar dot com
Reported By: michal at cihar dot com
Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.3.10
New Comment:
Sorry, the quotation was too short, it should have been:
"Be warned that parse error in required file doesn't cause processing
halting in PHP versions prior to PHP 4.3.5. Since this version, it
does."
Previous Comments:
------------------------------------------------------------------------
[2005-07-11 00:06:00] michal at cihar dot com
I've read the documentation! There is:
"Be warned that parse error in required file doesn't cause processing
halting in PHP versions prior to PHP 4.3.5."
It's about required and not about included files. Please either make
the documentation clear that the same applies to included file or make
interpreter not to fail on this.
------------------------------------------------------------------------
[2005-07-10 23:49:07] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
.
------------------------------------------------------------------------
[2005-07-10 23:39:28] michal at cihar dot com
Description:
------------
While including file which has a parse error, php stops further
processing. As I understand documentation, this should happen only for
required files. This is also way it worked in previous php versions.
We use such code in phpMyAdmin for including config file, what allows
us to display friendly message when there is some error, however in
latest PHP version user gets just empty page.
Reproduce code:
---------------
file1.php:
<?php
error_reporting(0);
include('./file2.php');
echo 'Test';
?>
file2.php:
<?php
if (
?>
Expected result:
----------------
Test
Actual result:
--------------
empty
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33637&edit=1