aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Setup.php9
-rw-r--r--include/text.php6
2 files changed, 13 insertions, 2 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php
index b5258a28f..9c688af01 100644
--- a/Zotlabs/Module/Setup.php
+++ b/Zotlabs/Module/Setup.php
@@ -496,6 +496,11 @@ class Setup extends \Zotlabs\Web\Controller {
function check_funcs(&$checks) {
$ck_funcs = array();
+ $disabled = explode(',',ini_get('disable_functions'));
+ if($disabled)
+ array_walk($disabled,'array_trim');
+
+
// add check metadata, the real check is done bit later and return values set
$this->check_add($ck_funcs, t('libCurl PHP module'), true, true);
$this->check_add($ck_funcs, t('GD graphics PHP module'), true, true);
@@ -511,13 +516,13 @@ class Setup extends \Zotlabs\Web\Controller {
$this->check_add($ck_funcs, t('Apache mod_rewrite module'), true, true);
}
}
- if((! function_exists('exec')) || strstr(ini_get('disable_functions'),'exec')) {
+ if((! function_exists('exec')) || in_array('exec',$disabled)) {
$this->check_add($ck_funcs, t('exec'), false, true, t('Error: exec is required but is either not installed or has been disabled in php.ini'));
}
else {
$this->check_add($ck_funcs, t('exec'), true, true);
}
- if((! function_exists('shell_exec')) || strstr(ini_get('disable_functions'),'shell_exec')) {
+ if((! function_exists('shell_exec')) || in_array('shell_exec',$disabled)) {
$this->check_add($ck_funcs, t('shell_exec'), false, true, t('Error: shell_exec is required but is either not installed or has been disabled in php.ini'));
}
else {
diff --git a/include/text.php b/include/text.php
index c4fafd8ef..fbf6df49e 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3120,3 +3120,9 @@ function cleanup_bbcode($body) {
return $body;
}
+
+// callback for array_walk
+
+function array_trim(&$v,$k) {
+ $v = trim($v);
+} \ No newline at end of file