check if is object
This commit is contained in:
parent
25941226e9
commit
d8b83ffe4b
@ -91,6 +91,10 @@ class Uploads extends Controller
|
|||||||
*/
|
*/
|
||||||
protected function getPath($media)
|
protected function getPath($media)
|
||||||
{
|
{
|
||||||
|
if (!is_object($media)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$path = $media->basename;
|
$path = $media->basename;
|
||||||
|
|
||||||
if (!empty($media->directory)) {
|
if (!empty($media->directory)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user