php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67519 @include supresses even syntax errors in the include
Submitted: 2014-06-25 21:09 UTC Modified: 2014-07-05 23:01 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: spam2 at rhsoft dot net Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.5.13 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: spam2 at rhsoft dot net
New email:
PHP Version: OS:

 

 [2014-06-25 21:09 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-05 23:01 UTC] yohgaki@php.net
-Status: Open +Status: Not a bug
 [2014-07-05 23:01 UTC] yohgaki@php.net
@ 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();
 [2014-07-06 09:20 UTC] spam2 at rhsoft dot net
did you read https://bugs.php.net/bug.php?id=7363

your comment with "@f();" and "f();" makes no sense
thats completly different to @include()

and it si completly *inconsistent* what is supressed in includes, parse errors are supressed, methods of classes most of the time correctly work with E_ALL as expected
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 20:01:35 2025 UTC