Skip to content

Commit

Permalink
cs-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-yee committed Sep 27, 2022
1 parent 15dd38f commit 0cb72e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion system/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ public function required_without($str = null, ?string $fields = null, array $dat
return true;
}

$nowKeyField = 0;

if (strpos($keyField, '.') !== false) {
$keyFieldArray = explode('.', $keyField);
$nowKeyField = $keyFieldArray[1];
Expand All @@ -315,7 +317,7 @@ public function required_without($str = null, ?string $fields = null, array $dat
$nowField = str_replace('*', $nowKeyField, $field);
$nowFieldVaule = dot_array_search($nowField, $data);

return (bool) (null !== $nowFieldVaule);
return null !== $nowFieldVaule;
}
}

Expand Down

0 comments on commit 0cb72e0

Please sign in to comment.