From 84547905d613b724da8dba198b20b27e5cf56b7c Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sun, 2 Oct 2016 11:17:33 -0500 Subject: [PATCH] Issue 163: Filesize shown for external files --- indefero/src/IDF/Upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indefero/src/IDF/Upload.php b/indefero/src/IDF/Upload.php index caf5290..a77b415 100644 --- a/indefero/src/IDF/Upload.php +++ b/indefero/src/IDF/Upload.php @@ -215,7 +215,8 @@ class IDF_Upload extends Pluf_Model if ($this->ext_file == "") { $this->md5 = md5_file ($this->getFullPath()); } else { - $this->filesize = $this->getRemoteFilesize($this->ext_file, false); + $this->filesize = max(0, $this->getRemoteFilesize($this->ext_file, false)); + } } }