From 44fcf4a6ed54d9a30f20a790bf6ea90cd3c2e601 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 30 Mar 2013 19:36:49 +0100 Subject: [PATCH] Noob-proof memory-limit server property --- src/API/ServerAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API/ServerAPI.php b/src/API/ServerAPI.php index e651aa4c..d850289a 100644 --- a/src/API/ServerAPI.php +++ b/src/API/ServerAPI.php @@ -248,7 +248,7 @@ class ServerAPI{ private function loadProperties(){ - if(($memory = $this->getProperty("memory-limit")) !== false){ + if(($memory = str_replace("B", "", strtoupper($this->getProperty("memory-limit")))) !== false){ $value = array("M" => 1, "G" => 1024); $real = ((int) substr($memory, 0, -1)) * $value[substr($memory, -1)]; if($real < 128){