-
-
Notifications
You must be signed in to change notification settings - Fork 61
PHP 8.0: @ Error Suppression operator does not silent fatal errors #1323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP 8.0: @ Error Suppression operator does not silent fatal errors #1323
Conversation
htdocs/class/xoopsform/form.php
Outdated
| if (!isset($var['name'])) { | ||
| $var['name'] = ''; | ||
| } | ||
| $var['name'] = sha1(get_class($object)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you want to do here? What does your code fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of suppression operator @ in:
@$var['name'] = sha1(get_class($object));
htdocs/class/xoopsform/form.php
Outdated
| case 'md5': | ||
|
|
||
| @$var['name'] = md5(get_class($object)); | ||
| if (!isset($var['name'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you want to do here? What does your code fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usage of suppression operator @ in:
@$var['name'] = md5(get_class($object));
| $content = rawurldecode(XoopsRequest::getText('text', '', 'POST')); | ||
|
|
||
| if (!$GLOBALS['xoopsSecurity']->validateToken(@$_POST['token'], false)) { | ||
| if (!$GLOBALS['xoopsSecurity']->validateToken(XoopsRequest::getString('token'), false)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XoopsRequest::getString('token', '', 'POST' )?
| if (file_exists($file_to_include)) { | ||
| include_once $file_to_include; | ||
| } else { | ||
| // Handle the case when the file doesn't exist or log an error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an error message is interesting
htdocs/include/common.php
Outdated
| try { | ||
| $xoopsDB->queryF($sql); | ||
| } catch (Exception $e) { | ||
| // Handle the exception or log the error message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
an error message is interesting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure what would we prefer here
…ature/remove_error_suppression_operator
…ithub.com/mambax7/XoopsCore25 into feature/remove_error_suppression_operator
…ature/remove_error_suppression_operator # Conflicts: # htdocs/install/page_dbsettings.php # htdocs/install/page_pathsettings.php # htdocs/modules/system/admin/users/main.php # htdocs/xoops_lib/modules/protector/admin.php # htdocs/xoops_lib/modules/protector/main.php
IssetNode ? $conf['isocom_action'] & 1 : 0 of type integer is incompatible with the type boolean expected by parameter $sanitize of Protector::check_sql_isolatedcommentin() IssetNode ? $conf['union_action'] & 1 : 0 of type integer is incompatible with the type boolean expected by parameter $sanitize of Protector::check_sql_union()
The variable $rev_ip does not seem to be defined for all execution paths leading up to this point.
…ths leading up to this point.
It seems like $user->getVar('level') can also be of type array and array; however, parameter $value of XoopsFormRadio::__construct() does only seem to accept null|string, maybe add an additional type check?
It seems like $value can also be of type array and array; however, parameter $value of XoopsFormRadio::__construct() does only seem to accept null|string
The variable $var seems to never exist and therefore isset should always be false.
…ature/remove_error_suppression_operator # Conflicts: # htdocs/include/checklogin.php # htdocs/modules/system/class/gui.php # htdocs/xoops_lib/modules/protector/include/postcheck_functions.php
…ithub.com/mambax7/XoopsCore25 into feature/remove_error_suppression_operator # Conflicts: # htdocs/modules/system/class/gui.php # htdocs/xoops_lib/modules/protector/include/postcheck_functions.php
No description provided.