diff options
author | kondou <kondou@ts.unde.re> | 2013-08-01 21:01:26 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-01 21:01:26 +0200 |
commit | 1b567b2ad1835d0c724309e68d3fad5dcc1b8bda (patch) | |
tree | 33f6224f0f7b39db817d2c4be27591f44db7b47c | |
parent | 0c1008bb69b3ae68b2ffd51be3f0028890ea94f8 (diff) | |
download | nextcloud-server-1b567b2ad1835d0c724309e68d3fad5dcc1b8bda.tar.gz nextcloud-server-1b567b2ad1835d0c724309e68d3fad5dcc1b8bda.zip |
Don't throw a fatal, if is_file() parameter isn't
a 'valid path', but only a data/base64-string.
Related to #4283
-rw-r--r-- | lib/image.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/image.php b/lib/image.php index c1b187608a6..4bc38e20e56 100644 --- a/lib/image.php +++ b/lib/image.php @@ -392,7 +392,7 @@ class OC_Image { */ public function loadFromFile($imagepath=false) { // exif_imagetype throws "read error!" if file is less than 12 byte - if(!is_file($imagepath) || !file_exists($imagepath) || filesize($imagepath) < 12 || !is_readable($imagepath)) { + if(!@is_file($imagepath) || !file_exists($imagepath) || filesize($imagepath) < 12 || !is_readable($imagepath)) { // Debug output disabled because this method is tried before loadFromBase64? OC_Log::write('core', 'OC_Image->loadFromFile, couldn\'t load: '.$imagepath, OC_Log::DEBUG); return false; |