Skip to content

Commit

Permalink
[5.3] Deal with null $files in request (#15558)
Browse files Browse the repository at this point in the history
* Deal with null files in request

*    fix style
  • Loading branch information
themsaid authored and taylorotwell committed Sep 22, 2016
1 parent da531cd commit 4532598
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,11 +870,15 @@ public function duplicate(array $query = null, array $request = null, array $att
/**
* Filter the given array of files, removing any empty values.
*
* @param array $files
* @param mixed $files
* @return mixed
*/
protected function filterFiles($files)
{
if (! $files) {
return;
}

foreach ($files as $key => $file) {
if (is_array($file)) {
$files[$key] = $this->filterFiles($files[$key]);
Expand Down

0 comments on commit 4532598

Please sign in to comment.