[PATCH 3/3] php_to_byte returns invalid value if unit not set

  • From: Otto Vainio <otto@xxxxxxxxxxxx>
  • Date: Fri, 28 May 2010 14:19:32 +0300

---
 inc/common.php |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/inc/common.php b/inc/common.php
index 144f8e4..ec27d8a 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -1324,6 +1324,9 @@ function php_to_byte($v){
         case 'K':
             $ret *= 1024;
         break;
+        default;
+            $ret *= 10;
+        break;
     }
     return $ret;
 }
-- 
1.6.4.2


--------------070908070802010203080801--
-- 
DokuWiki mailing list - more info at
http://www.dokuwiki.org/mailinglist

Other related posts:

  • » [PATCH 3/3] php_to_byte returns invalid value if unit not set - Otto Vainio