Skip to content

Commit

Permalink
chore: improved PHP 8 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
winternet-studio committed May 8, 2024
1 parent 8d002b4 commit 5c1f94b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/FormHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,8 @@ public static function addResultErrors($result, &$model, $options = []) {

foreach ($modelErrors as $attr => $errors) {
// Generate the form field ID so Yii ActiveForm client-side can apply the error message
if (!$modelName) {
$modelName = get_class($model);
$modelName = mb_strtolower(substr($modelName, strrpos($modelName, '\\')+1));
}
$modelName = get_class($model);
$modelName = mb_strtolower(substr($modelName, strrpos($modelName, '\\')+1));

$attributeId = $modelName .'-'. mb_strtolower($attr);

Expand Down
1 change: 1 addition & 0 deletions src/UserException.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function __construct($msg, $arrayInternalInfo = [], $options = []) {
}
}

$extraMessage = '';
if ($msg === null) {
$messageString = $messageStringHtml = 'NULL';
} elseif (is_array($msg) || is_object($msg) || is_bool($msg)) {
Expand Down

0 comments on commit 5c1f94b

Please sign in to comment.