aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-11-16 22:14:11 +0100
committerMario Vavti <mario@mariovavti.com>2018-11-16 22:14:11 +0100
commitafc75af62f759181bbe6a806b523c6ca52126f5f (patch)
tree1bd6bbb4156a3780ae94ec26d50aadf777e23310 /include
parent2778a7220ff341956a00705db5da0f71f18c982c (diff)
downloadvolse-hubzilla-afc75af62f759181bbe6a806b523c6ca52126f5f.tar.gz
volse-hubzilla-afc75af62f759181bbe6a806b523c6ca52126f5f.tar.bz2
volse-hubzilla-afc75af62f759181bbe6a806b523c6ca52126f5f.zip
strlen($this->imageString()) does not return the correct size when dealing with os_storage images. use filesize() instead.
Diffstat (limited to 'include')
-rw-r--r--include/photo/photo_driver.php4
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']),