Bug #80750 [Com]: @ breaks functions
| From: | antonino dot spampinato86 at gmail dot com | Date: | Fri, 27 Aug 2021 21:42:16 +0000 |
| Subject: | Bug #80750 [Com]: @ breaks functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236133@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80750&edit=1
ID: 80750
Comment by: antonino dot spampinato86 at gmail dot com
Reported by: pavlusha23 at gmail dot com
Summary: @ breaks functions
Status: Duplicate
Type: Bug
Package: Scripting Engine problem
Operating System: All
PHP Version: 8.0.2
Block user comment: N
Private report: N
New Comment:
// Turn off all error reporting
error_reporting(0);
//Previous php 8.0 Error Control Operators is 0, after is mask check "variable"
//bad code
@error_reporting(0);
The @ operator will no longer silence fatal errors (E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR,
E_USER_ERROR, E_RECOVERABLE_ERROR, E_PARSE). Error handlers that expect error_reporting to be 0 when
@ is used, should be adjusted to use a mask check instead
Previous Comments:
------------------------------------------------------------------------
[2021-02-14 09:04:30] requinix@php.net
Duplicate of bug #80700
------------------------------------------------------------------------
[2021-02-14 09:04:30] requinix@php.net
Duplicate of bug #80700
------------------------------------------------------------------------
[2021-02-14 09:02:34] pavlusha23 at gmail dot com
Description:
------------
When using the @ symbol, the error_reporting function does not work.
Test script:
---------------
@error_reporting(0);
var_dump(error_reporting());
error_reporting(0);
var_dump(error_reporting());
Expected result:
----------------
int(0)
int(0)
Actual result:
--------------
int(32767)
int(0)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80750&edit=1