(FIX) deprecated messages and minor bugs - #405
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Style change only.
Please revert.
| } | ||
|
|
||
| $sth->execute(); | ||
| $sth->execute(); |
There was a problem hiding this comment.
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.
Style change only.
Please revert.
| Requirements | ||
| --------- | ||
| * PHP 5.2 | ||
| * PHP 7.0 |
There was a problem hiding this comment.
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: