Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 3b84df4

Browse files
committed
array_key_exists is a better fit than isset for checking if key exists - corrected
1 parent 26fcee5 commit 3b84df4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public function bindValues(array $values = [], array $validationGroup = null)
361361

362362
// If there is a base fieldset, only hydrate beginning from the base fieldset
363363
if ($this->baseFieldset !== null) {
364-
$data = isset($data[$this->baseFieldset->getName()]) ? $data[$this->baseFieldset->getName()] : [];
364+
$data = array_key_exists($this->baseFieldset->getName(), $data) ? $data[$this->baseFieldset->getName()] : [];
365365
$this->object = $this->baseFieldset->bindValues($data, $validationGroup[$this->baseFieldset->getName()]);
366366
} else {
367367
$this->object = parent::bindValues($data, $validationGroup);

0 commit comments

Comments
 (0)