diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-08-02 04:38:26 -0700 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-08-02 04:38:26 -0700 |
commit | c5c05b808c777c9ef3e2faff5d0621c1fa7253ea (patch) | |
tree | e581a1e0e8914296838dd6c12ab65ff14790cdcc | |
parent | 895d9ba1b9529f0ef7dbb47402324f2f8436fcdb (diff) | |
parent | 1b567b2ad1835d0c724309e68d3fad5dcc1b8bda (diff) | |
download | nextcloud-server-c5c05b808c777c9ef3e2faff5d0621c1fa7253ea.tar.gz nextcloud-server-c5c05b808c777c9ef3e2faff5d0621c1fa7253ea.zip |
Merge pull request #4284 from owncloud/dont_fatal_on_is_file
Don't throw a fatal, if is_file() parameter isn't a 'valid path', but only a data/base64-string.
-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; |