@@ -1787,6 +1787,7 @@ public function privOptionDefaultThreshold(&$p_options)
1787
1787
$ v_memory_limit = ini_get ('memory_limit ' );
1788
1788
$ v_memory_limit = trim ($ v_memory_limit );
1789
1789
$ last = strtolower (substr ($ v_memory_limit , -1 ));
1790
+ $ v_memory_limit = preg_replace ('/\s*[KkMmGg]$/ ' , '' , $ v_memory_limit );
1790
1791
1791
1792
if ($ last == 'g ' ) {
1792
1793
//$v_memory_limit = $v_memory_limit*1024*1024*1024;
@@ -5398,7 +5399,12 @@ function PclZipUtilOptionText($p_option)
5398
5399
// --------------------------------------------------------------------------------
5399
5400
function PclZipUtilTranslateWinPath ($ p_path , $ p_remove_disk_letter = true )
5400
5401
{
5401
- if (stristr (php_uname (), 'windows ' )) {
5402
+ $ disable_functions = (ini_get ('disable_functions ' ) != '' and ini_get ('disable_functions ' ) != false ) ? array_map ('trim ' , preg_split ("/[\s,]+/ " , ini_get ('disable_functions ' ))) : array ();
5403
+ if (extension_loaded ('suhosin ' )) {
5404
+ $ disable_functions = array_merge ($ disable_functions , array_map ('trim ' , preg_split ("/[\s,]+/ " , ini_get ('suhosin.executor.func.blacklist ' ))));
5405
+ }
5406
+ $ os = strtoupper ((function_exists ('php_uname ' ) and !in_array ('php_uname ' , $ disable_functions ) and strtoupper (php_uname ('s ' )) != '' ) ? php_uname ('s ' ) : PHP_OS );
5407
+ if (stristr ($ os , 'windows ' ) !== false ) {
5402
5408
// ----- Look for potential disk letter
5403
5409
if (($ p_remove_disk_letter ) && (($ v_position = strpos ($ p_path , ': ' )) != false )) {
5404
5410
$ p_path = substr ($ p_path , $ v_position + 1 );
0 commit comments