* adjust for ioncube php8.1.

This commit is contained in:
wangyidong
2022-08-25 16:18:53 +08:00
parent 4f270415b3
commit f18bba53af
+12 -1
View File
@@ -1461,6 +1461,17 @@ class baseRouter
chdir(dirname($file2Included));
helper::import($file2Included);
/* Check file is encode by ioncube. */
$isEncrypted = false;
if($isExt)
{
$fp = fopen($file2Included, 'r');
$line1 = fgets($fp);
$line2 = fgets($fp);
fclose($fp);
if(strpos($line1, '<?php //') === 0 and strpos($line2, "if(!extension_loaded('ionCube Loader'))") === 0) $isEncrypted = true;
}
/*
* 设置control的类名。
* Set the class name of the control.
@@ -1500,7 +1511,7 @@ class baseRouter
{
$default = $paramDefaultValue[$className][$methodName][$name];
}
elseif($param->isDefaultValueAvailable())
elseif(!$isEncrypted and $param->isDefaultValueAvailable())
{
$default = $param->getDefaultValue();
}