From 8e43ba51f6a55bb5d1dab1fddd8588cb15b3a95c Mon Sep 17 00:00:00 2001 From: e107steved Date: Sun, 6 Jul 2008 21:25:31 +0000 Subject: [PATCH] Make file size decode more tolerant --- e107_handlers/upload_handler.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e107_handlers/upload_handler.php b/e107_handlers/upload_handler.php index dbc571149..f26a64897 100644 --- a/e107_handlers/upload_handler.php +++ b/e107_handlers/upload_handler.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/upload_handler.php,v $ -| $Revision: 1.14 $ -| $Date: 2008-05-25 09:04:16 $ +| $Revision: 1.15 $ +| $Date: 2008-07-06 21:25:31 $ | $Author: e107steved $ +---------------------------------------------------------------+ */ @@ -623,7 +623,7 @@ function file_size_decode($source, $compare = 0, $action = '') $source = trim($source); if (strtolower(substr($source,-1,1)) == 'b') $source = substr($source,0,-1); // Trim a trailing byte indicator $mult = 1; - $nostrip = FALSE; + if (strlen($source) && (strtoupper(substr($source,-1,1)) == 'B')) $source = substr($source,0,-1); if (!$source || is_numeric($source)) { $val = $source;