Skip to content

Commit

Permalink
check if is object
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Nov 14, 2018
1 parent 2594122 commit d8b83ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/Common/Uploads.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ public function destroy($id, Request $request)
*/
protected function getPath($media)
{
if (!is_object($media)) {
return false;
}

$path = $media->basename;

if (!empty($media->directory)) {
Expand Down

0 comments on commit d8b83ff

Please sign in to comment.