|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-05-09 03:41 UTC] microcamers at hotmail dot com
Description:
------------
I just upgraded to the latest snapshot and now find that Parse Errors stop the excecution of the script with an error.
So now i have the choice between displaying no error as to whats happened and a blank page coming up, or displaying an ugly php error telling the user things about my files, because i cannot catch parse errors with php's error handling functions.
Reproduce code:
---------------
if(!@include("file_with_parse_error.php"){
die("There has been a problem generating this page");
}
Expected result:
----------------
If the file had a parse error or didnt exist, it would die with that error. Or even better i could have it email me.
Actual result:
--------------
Now it just prints "Parse error: parse error, unexpected ..." even though i have put the @ symbol before it. It also gets through output buffering.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 02:00:01 2025 UTC |
hello, i think that the fault exists in your script. if you copied these lines directly, then your missing a right bracket if(!@include("file_with_parse_error.php"){ should be if(!@include("file_with_parse_error.php")){ i just spotted this and didn't run the script as i'm having a problem with windoze.. sorry if this is wasting your time :)Description: ------------ I just upgraded to the latest snapshot and now find that Parse Errors stop the excecution of the script with an error. So now i have the choice between displaying no error as to whats happened and a blank page coming up, or displaying an ugly php error telling the user things about my files, because i cannot catch parse errors with php's error handling functions. Reproduce code: --------------- if(!@include("file_with_parse_error.php")){ die("There has been a problem generating this page"); } Expected result: ---------------- If the file had a parse error or didnt exist, it would die with that error. Or even better i could have it email me. Actual result: -------------- Now it just prints "Parse error: parse error, unexpected ..." even though i have put the @ symbol before it. It also gets through output buffering.