Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
6562680 committed Jun 27, 2024
1 parent 744c828 commit 68be524
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static function php_throwable($error = null, ...$errors) : ?object
*
* @return array{
* messageList: string[],
* odeList: int[],
* codeList: int[],
* previousList: string[],
* messageCodeList: array[],
* messageDataList: array[],
Expand Down Expand Up @@ -178,10 +178,8 @@ public static function php_throwable_args($arg = null, ...$args) : array
}

if (isset($messageList[ $i ])) {
if (null !== $messageList[ $i ]) {
if (preg_match('/^[a-z](?!.*\s)/i', $messageList[ $i ])) {
$messageCode = $messageCodeList[ $i ] = strtoupper($messageList[ $i ]);
}
if (preg_match('/^[a-z](?!.*\s)/i', $messageList[ $i ])) {
$messageCode = $messageCodeList[ $i ] = strtoupper($messageList[ $i ]);
}
}

Expand Down

0 comments on commit 68be524

Please sign in to comment.