diff options
author | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-15 22:09:30 -0400 |
---|---|---|
committer | Paul Arthur <paul.arthur@flowerysong.com> | 2013-05-15 22:09:30 -0400 |
commit | 1105e0487fea666944a9cad887dbbff9e5c16a9f (patch) | |
tree | 486133b0e9f32bc6934aee7931e5811b4baf1d8b /lib | |
parent | 47f140a8b1d0c33c2a2521ea9fc9cb076075a2c9 (diff) | |
download | ampache-1105e0487fea666944a9cad887dbbff9e5c16a9f.tar.gz ampache-1105e0487fea666944a9cad887dbbff9e5c16a9f.tar.bz2 ampache-1105e0487fea666944a9cad887dbbff9e5c16a9f.zip |
Don't reset the PHP memory_limit when it's -1
This function is never supposed to lower the limit, and -1 is a flag
value for no limit.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/general.lib.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/general.lib.php b/lib/general.lib.php index daba19ec..763de68f 100644 --- a/lib/general.lib.php +++ b/lib/general.lib.php @@ -27,7 +27,12 @@ */ function set_memory_limit($new_limit) { - $current_limit = UI::unformat_bytes(ini_get('memory_limit')); + $current_limit = ini_get('memory_limit'); + if ($current_limit == -1) { + return; + } + + $current_limit = UI::unformat_bytes($current_limit); $new_limit = UI::unformat_bytes($new_limit); if ($current_limit < $new_limit) { |