diff --git a/lib/pclzip.lib.php b/lib/pclzip.lib.php index c624cc0..f2dea6a 100644 --- a/lib/pclzip.lib.php +++ b/lib/pclzip.lib.php @@ -1841,7 +1841,9 @@ function privOptionDefaultThreshold(&$p_options) // ----- Get 'memory_limit' configuration value $v_memory_limit = ini_get('memory_limit'); $v_memory_limit = trim($v_memory_limit); - $last = strtolower(substr($v_memory_limit, -1)); + $last = substr($v_memory_limit, -1); + $v_memory_limit = rtrim($v_memory_limit, $last); + $last = strtolower($last); if($last == 'g') //$v_memory_limit = $v_memory_limit*1024*1024*1024; diff --git a/src/Zip/PclZipProxy.php b/src/Zip/PclZipProxy.php index b65786a..e31db68 100644 --- a/src/Zip/PclZipProxy.php +++ b/src/Zip/PclZipProxy.php @@ -21,7 +21,7 @@ */ class PclZipProxy implements ZipInterface { - const TMP_DIR = './tmp'; + const TMP_DIR = PCLZIP_TEMPORARY_DIR; protected $openned = false; protected $filename; protected $pclzip;