Bug #67519 [Opn->Nab]: @include supresses even syntax errors in the include
Edit report at https://bugs.php.net/bug.php?id=67519&edit=1
ID: 67519
Updated by: yohgaki@php.net
Reported by: spam2 at rhsoft dot net
Summary: @include supresses even syntax errors in the include
-Status: Open
+Status: Not a bug
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.5.13
Block user comment: N
Private report: N
New Comment:
@ operator is supposed to turn off all errors until it returns to it.
[yohgaki@dev php-src]$ php -d error_reportring=-1 t.php
PHP Notice: Undefined variable: aaaa in /home/yohgaki/workspace/ext/git/oss/php.net/php-src/t.php
on line 3
[yohgaki@dev php-src]$ cat t.php
<?php
function f() {
echo $aaaa;
}
@f();
f();
Previous Comments:
------------------------------------------------------------------------
[2014-06-25 21:09:54] spam2 at rhsoft dot net
Description:
------------
https://bugs.php.net/bug.php?id=7363
that happens again
@include() in __get and __autoload leads to supress any errors in the included files which is wrong
- @include is meant to save multiple and expsensive filesystem-operations by enforce
if(file_exists(){include()} but *not* to supress any warings and even fatal errors inside the
includeed code if it don't fail
Expected result:
----------------
supress warnings if includes don#t exists but not runtime and parse errors in included code
Actual result:
--------------
a white page in many cases because @include supresses recursive
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67519&edit=1
Thread (3 messages)