Skip to content

Commit

Permalink
Merge pull request #1738 from bangbangda/Fix-issues-1728
Browse files Browse the repository at this point in the history
Fix required_with rule bug. Fixes #1728
  • Loading branch information
lonnieezell authored Feb 19, 2019
2 parents 5fd98b4 + 4722d67 commit 3b82e26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ public function required_with($str = null, string $fields, array $data): bool
// If the field is present we can safely assume that
// the field is here, no matter whether the corresponding
// search field is present or not.
$present = $this->required($data[$str] ?? null);
$present = $this->required($str ?? '');

if ($present === true)
if ($present)
{
return true;
}
Expand Down

0 comments on commit 3b82e26

Please sign in to comment.