-
-
Notifications
You must be signed in to change notification settings - Fork 517
Error control operator may trigger a fatal error with PHP 8.0 #2066
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem?
In many plugins, I have noticed an issue with the error control operator @ used with set_time_limit().
The error happens when PHP 8.0 is used and when set_time_limit() has been disabled on the server.
Prior to PHP 8.0.0, it was possible for the @ operator to disable critical errors that will terminate script execution. For example, prepending @ to a call of a function which did not exist, by being unavailable or mistyped, would cause the script to terminate with no indication as to why.
https://www.php.net/manual/en/language.operators.errorcontrol.php
Describe the solution you'd like
I think the sniffs should look for the error operator and trigger a warning.
Additional context (optional)
- PHP 8.0
- any disabled function used with the error operator
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.