diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-11-16 21:14:11 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-11-16 22:19:01 +0100 |
commit | 4812c5486db3f49cd1df34f8678c51369ac76d7a (patch) | |
tree | 08c4b316722638d83357e58ffeab06913c2c32a6 /include/photo/photo_driver.php | |
parent | 23b30fdd109dec05219624a369e2943dd641fc8a (diff) | |
download | volse-hubzilla-4812c5486db3f49cd1df34f8678c51369ac76d7a.tar.gz volse-hubzilla-4812c5486db3f49cd1df34f8678c51369ac76d7a.tar.bz2 volse-hubzilla-4812c5486db3f49cd1df34f8678c51369ac76d7a.zip |
strlen($this->imageString()) does not return the correct size when dealing with os_storage images. use filesize() instead.
(cherry picked from commit afc75af62f759181bbe6a806b523c6ca52126f5f)
Diffstat (limited to 'include/photo/photo_driver.php')
-rw-r--r-- | include/photo/photo_driver.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/photo/photo_driver.php b/include/photo/photo_driver.php index 4173d727e..b70a13622 100644 --- a/include/photo/photo_driver.php +++ b/include/photo/photo_driver.php @@ -413,7 +413,7 @@ abstract class photo_driver { intval($p['width']), (intval($p['os_storage']) ? dbescbin($p['os_syspath']) : dbescbin($this->imageString())), intval($p['os_storage']), - intval(strlen($this->imageString())), + (intval($p['os_storage']) ? @filesize($p['os_syspath']) : strlen($this->imageString())), intval($p['imgscale']), intval($p['photo_usage']), dbesc($p['title']), @@ -445,7 +445,7 @@ abstract class photo_driver { intval($p['width']), (intval($p['os_storage']) ? dbescbin($p['os_syspath']) : dbescbin($this->imageString())), intval($p['os_storage']), - intval(strlen($this->imageString())), + (intval($p['os_storage']) ? @filesize($p['os_syspath']) : strlen($this->imageString())), intval($p['imgscale']), intval($p['photo_usage']), dbesc($p['title']), |