Skip to content

Commit

Permalink
Fix FormDataRenderer to not choke on unnamed elements
Browse files Browse the repository at this point in the history
  • Loading branch information
theseer committed Mar 6, 2024
1 parent 393d12a commit 7290a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/formdata/FormDataRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private function processElements(StaticNodeList $elements): void {
private function processInput(DOMElement $element): void {
$name = $this->nameToLookupKey($element);

if (!$this->form->has($name)) {
if ($name === '' || !$this->form->has($name)) {
return;
}

Expand Down Expand Up @@ -102,7 +102,7 @@ private function processInput(DOMElement $element): void {
private function processTextArea(DOMElement $element): void {
$name = $this->nameToLookupKey($element);

if (!$this->form->has($name)) {
if ($name === '' || !$this->form->has($name)) {
return;
}

Expand Down

0 comments on commit 7290a69

Please sign in to comment.