Skip to content

Commit a1e43b5

Browse files
VINADES.,JSChoaquynhtim99
VINADES.,JSC
authored andcommitted
Fix class PclZip php 7.1
1 parent 8a050c9 commit a1e43b5

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

admin/extensions/upload.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
} elseif ($extConfig['extension']['type'] == 'cronjob') {
401401
$xtpl->assign('URL_GO', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=settings&' . NV_OP_VARIABLE . '=cronjobs_add&file=' . $extConfig['extension']['name']);
402402
} else {
403-
$xtpl->assign('URL_GO', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' + $module_name + '&' . NV_OP_VARIABLE . '=' . $op);
403+
$xtpl->assign('URL_GO', NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op);
404404
}
405405

406406
$xtpl->parse('extract.complete.ok');

vendor/vinades/pclzip/pclzip.lib.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ public function privOptionDefaultThreshold(&$p_options)
17871787
$v_memory_limit = ini_get('memory_limit');
17881788
$v_memory_limit = trim($v_memory_limit);
17891789
$last = strtolower(substr($v_memory_limit, -1));
1790+
$v_memory_limit = preg_replace('/\s*[KkMmGg]$/', '', $v_memory_limit);
17901791

17911792
if ($last == 'g') {
17921793
//$v_memory_limit = $v_memory_limit*1024*1024*1024;
@@ -5398,7 +5399,12 @@ function PclZipUtilOptionText($p_option)
53985399
// --------------------------------------------------------------------------------
53995400
function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter = true)
54005401
{
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) {
54025408
// ----- Look for potential disk letter
54035409
if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
54045410
$p_path = substr($p_path, $v_position + 1);

0 commit comments

Comments
 (0)