diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-04-04 16:41:08 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2012-04-04 16:41:08 +0000 |
| commit | 8e94bb24a98919815e39f366d45fdb49673e6147 (patch) | |
| tree | 38623daf7ad761d81557b40eeb84577326028b14 | |
| parent | aca2f30009d59310ec38989badbd2ab20d654fac (diff) | |
- Fix bug where memory_limit = -1 wasn't handled properly
git-svn-id: https://svn.roundcube.net/trunk@6039 208e9e7b-5314-0410-a742-e7e81cd9613c
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/include/main.inc | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index 9083dbb5c..5808e73e7 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Fix bug where memory_limit = -1 wasn't handled properly - Support LDAP RFC2256's country object class read/write (#1488123) - Upgraded to jQuery 1.7.2 - Image resize with GD extension (#1488383) diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index ecb46ab25..51a65b505 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1611,7 +1611,7 @@ function rcmail_mem_check($need) $mem_limit = parse_bytes(ini_get('memory_limit')); $memory = function_exists('memory_get_usage') ? memory_get_usage() : 16*1024*1024; // safe value: 16MB - return $mem_limit && $memory + $need > $mem_limit ? false : true; + return $mem_limit > 0 && $memory + $need > $mem_limit ? false : true; } |
