-
Notifications
You must be signed in to change notification settings - Fork 234
(FIX) deprecated messages and minor bugs #405
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
base: master
Are you sure you want to change the base?
Conversation
chore: update PHP to version 7 and fix compatibility with PHP 8.2 - Updated minimum PHP version to 7.0 due to usage of the null coalescing operator (??). - Fixed deprecated warnings in PHP 8.2 related to strtolower, trim, and ctype functions. Monster module: - Fixed MVP search with "no" option, which previously failed by comparing to 0 instead of checking for null. - Added support for renewal tables to allow searching for custom monsters.
|
|
||
| $account = trim($params->get('account')); | ||
| $bannedBy = trim($params->get('banned_by')); | ||
| $account = trim($params->get('account') ?? ''); |
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.
Instead of putting ?? '' all over the place can we just put the sanitizer in the class init itself?
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.
Are you proposing to automatically apply trim() to all parameters returned by the ->get() method?
Or is the idea to provide a way to return sanitized data directly from the method, something like:
$email = $params->get('email', '', FILTER_SANITIZE_EMAIL);
As in most modern frameworks, the responsibility for sanitizing input data is typically not handled directly by accessor methods like get().
Instead, it is generally up to the developer to perform sanitization manually or through custom helper methods, such as validations or specific input filters.
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 mean put this on class init, it's too much work to do it on each class instantiation
| if ($txn) { | ||
| $title = "Viewing PayPal Transaction ({$txn->txn_id}, status: {$txn->payment_status})"; | ||
|
|
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.
Style only changes in this file.
Please revert the whole file.
| $errorMessage = sprintf(Flux::message('IpbanAlreadyBanned'), $ipban2->list); | ||
| } | ||
| } | ||
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.
Style only changes in this file.
Please revert the whole file.
| $tempTable = new Flux_TemporaryTable($server->connection, $tableName, $fromTables); | ||
| $shopTable = Flux::config('FluxTables.ItemShopTable'); | ||
|
|
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.
Style only changes in this file.
Please revert the whole file.
| @@ -1,6 +1,8 @@ | |||
| <?php | |||
| if (!defined('FLUX_ROOT')) exit; | |||
|
|
|||
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.
Style only changes in this file.
Please revert the whole file.
| $datefrom = $params->get('from_date'); | ||
| $dateto = $params->get('to_date'); | ||
| $type = array(); | ||
|
|
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.
Style only changes in this file.
Please revert the whole file.
| $sql .= "VALUES (?, ?)"; | ||
| $sth = $server->connection->getStatement($sql); | ||
| $sth->execute(array($_POST['name'],$_POST['display'])); | ||
| $sth->execute(array($_POST['name'],$_POST['display'])); |
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.
Style change only.
Please revert.
| if(isset($option) && $option == 'delete'){ | ||
| $sth = $server->connection->getStatement("DELETE FROM {$server->loginDatabase}.$tbl WHERE account_id = $staffid"); | ||
| $sth->execute(); | ||
| $sth->execute(); |
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.
Style change only.
Please revert.
| } | ||
|
|
||
| $sth->execute(); | ||
| $sth->execute(); |
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.
Style change only.
Please revert.
| $sql .= "VALUES (?, ?, ?, ?, ?)"; | ||
| $sth = $server->connection->getStatement($sql); | ||
| $sth->execute(array($_POST['account_id'],$_POST['account_name'],$_POST['prefered_name'],$_POST['team'], $_POST['emailalerts'])); | ||
| $sth->execute(array($_POST['account_id'],$_POST['account_name'],$_POST['prefered_name'],$_POST['team'], $_POST['emailalerts'])); |
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.
Style change only.
Please revert.
| Requirements | ||
| --------- | ||
| * PHP 5.2 | ||
| * PHP 7.0 |
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 just bumped PHP minimum version to 7.3
Please merge upstream master into your branch.
Changes proposed in this Pull Request:
Fixes
PHP and Readme
Monster module: