Skip to content

Commit

Permalink
Null validation bug fixed 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulhaque committed Oct 13, 2023
1 parent de85400 commit 5d41d9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/AbstractFilepond.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ protected function getFieldValue()
/**
* Set the FilePond field value data
*
* @param string|array $fieldValue
* @return $this
*/
protected function setFieldValue($fieldValue)
protected function setFieldValue(string|array|null $fieldValue)
{
if (! $fieldValue) {
$this->fieldValue = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Filepond.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Filepond extends AbstractFilepond
*
* @return $this
*/
public function field(string|array $field, bool $checkOwnership = true)
public function field(string|array|null $field, bool $checkOwnership = true)
{
$this->setFieldValue($field)
->setTempDisk(config('filepond.temp_disk', 'local'))
Expand Down

0 comments on commit 5d41d9f

Please sign in to comment.