Skip to content

Commit

Permalink
if (! $messages) for better performance
Browse files Browse the repository at this point in the history
Co-Authored-By: bangbangda <[email protected]>
  • Loading branch information
samsonasik and bangbangda authored Nov 8, 2018
1 parent b885f53 commit 9c28bcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function validate($rules, array $messages = []): bool
}

// If no error message is defined, use the error message in the Config\Validation file
if (count($messages) === 0)
if (! $messages)
{
$errorName = $rules . '_errors';
$messages = $validation->$errorName ?? [];
Expand Down

0 comments on commit 9c28bcf

Please sign in to comment.