diff options
author | nobody <nobody@zotlabs.com> | 2021-08-25 19:13:31 -0700 |
---|---|---|
committer | nobody <nobody@zotlabs.com> | 2021-08-25 19:13:31 -0700 |
commit | aa2106f9495bee4dcf0701fbd9fec8de6fa44984 (patch) | |
tree | f2e7178f78311069bd54471f6c063c5901d16fb7 /include/attach.php | |
parent | 73b53675b1a339cfd950845279438e35b4e2dc7c (diff) | |
parent | 6261d0826c49ca24df9f694931592fbb9bf60f7e (diff) | |
download | volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.tar.gz volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.tar.bz2 volse-hubzilla-aa2106f9495bee4dcf0701fbd9fec8de6fa44984.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/attach.php')
-rw-r--r-- | include/attach.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/attach.php b/include/attach.php index 09d4005e8..56fb936e7 100644 --- a/include/attach.php +++ b/include/attach.php @@ -658,8 +658,12 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) { $def_extension = ''; $is_photo = 0; - $gis = @getimagesize($src); - logger('getimagesize: ' . print_r($gis,true), LOGGER_DATA); + + if ($src) { + $gis = @getimagesize($src); + logger('getimagesize: ' . print_r($gis,true), LOGGER_DATA); + } + if(($gis) && ($gis[2] === IMAGETYPE_GIF || $gis[2] === IMAGETYPE_JPEG || $gis[2] === IMAGETYPE_PNG || $gis[2] === IMAGETYPE_WEBP)) { $is_photo = 1; if($gis[2] === IMAGETYPE_GIF) |