Skip to content

Commit 5324c14

Browse files
committed
Merge pull request formers#190 from tortuetorche/patch-1
Convert 'PATCH' form method attribute to hidden field.
2 parents e13a7aa + fb59b5e commit 5324c14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Former/Form/Form.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function __toString()
234234
$this->attributes['name'] = $this->name;
235235

236236
// Add spoof method
237-
if ($this->method == 'PUT' or $this->method == 'DELETE') {
237+
if (in_array($this->method, array('PUT', 'PATCH', 'DELETE'))) {
238238
$spoof = $this->former->hidden('_method', $this->method);
239239
$this->method = 'POST';
240240
} else {

0 commit comments

Comments
 (0)