Skip to content

Commit 68cf696

Browse files
committed
Update Fieldset.php
1 parent cfdb2dc commit 68cf696

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Fieldset.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,12 @@ public function buildError(string $errorType)
209209
*/
210210
public function isValid($values, bool $multipleErrors = false, bool $fromParent = false): bool
211211
{
212-
if (!is_array($values) && !is_object($values)) {
212+
if (!is_array($values) && !is_object($values) && !is_null($values)) {
213213
return $this->buildError('valuesType');
214214
}
215215

216216
if (is_object($values)) $values = (array) $values;
217+
else if (is_null($values)) $values = [];
217218
$this->valuesBefore = &$values;
218219
$this->values = [];
219220
$this->errors()->clear();

0 commit comments

Comments
 (0)