ID:               28078
 Updated by:       [EMAIL PROTECTED]
 Reported By:      DavidSmith at byu dot net
-Status:           Open
+Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: Linux
 PHP Version:      4.3.5
 New Comment:

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php


Previous Comments:
------------------------------------------------------------------------

[2004-04-20 15:53:27] DavidSmith at byu dot net

Description:
------------
Under previous versions of PHP, calling include() on a file containing
syntax errors did not cause script termination. This is in accordance
with the documentation on include(). However, in 4.3.5, syntax errors
in included files appear to cause script termination. Tested with
4.1.x, 4.2.x, and 4.3.1.

Reproduce code:
---------------
Two files are required to reproduce this bug:

1. test.php:
<?php
echo "including...<br>\n";
include 'test-error.php';
echo "done.<br>\n";
?>

2. test-error.php (intentionally contains a syntax error):
<?php
*
?>

Expected result:
----------------
It is expected that a syntax error will not cause script termination.
Thus, the expected output is this:

including...

Parse error: parse error, unexpected '*' in /var/www/test-error.php on
line 3
done.



Actual result:
--------------
including...

Parse error: parse error, unexpected '*' in /var/www/test-error.php on
line 3



---
Notice that "done." is not printed, since script execution terminated
on the include() line.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28078&edit=1

Reply via email to