improve pcntl_* function detect

This commit is contained in:
lgb
2024-04-09 19:35:04 +08:00
parent 8c3b05bf4d
commit 68a0bd96c3
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.12');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-04-05');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2024-04-09');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");
+2 -1
View File
@@ -172,7 +172,8 @@ class Install
$output = [];
$command = "php -r 'var_export(function_exists(\"$fn\"));'";
$result = exec($command, $output, $result_code);
$exists = $output[0] == 'true';
$lastThreeChars = substr(trim($output[0]), -3);
$exists = $lastThreeChars == 'true';
if (!$exists) {
$disabledFunctions[] = $fn;
}