Skip to content

Conversation

@mambax7
Copy link
Collaborator

@mambax7 mambax7 commented Apr 2, 2023

No description provided.

if (!isset($var['name'])) {
$var['name'] = '';
}
$var['name'] = sha1(get_class($object));
Copy link
Contributor

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?

Copy link
Collaborator Author

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));

case 'md5':

@$var['name'] = md5(get_class($object));
if (!isset($var['name'])) {
Copy link
Contributor

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?

Copy link
Collaborator Author

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)) {
Copy link
Contributor

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
Copy link
Contributor

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

try {
$xoopsDB->queryF($sql);
} catch (Exception $e) {
// Handle the exception or log the error message
Copy link
Contributor

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

Copy link
Collaborator Author

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

mambax7 and others added 23 commits April 4, 2023 01:57
…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.
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
@mambax7 mambax7 merged commit 702d33a into XOOPS:master Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants