diff options
author | Andrew Dolgov <[email protected]> | 2014-09-27 09:49:52 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-09-27 09:49:52 +0400 |
commit | 41fac971c481b68c52c08b95148a17caba7a5fa7 (patch) | |
tree | 22677a462211412ade1a74660d7985f2685b43f8 /plugins | |
parent | 5a6842fcab28ed2a4a340f5a9f779b431df56541 (diff) | |
parent | 96aba17f013a8457d154a7ba5c85451cfd69d239 (diff) |
Merge pull request #410 from bram85/master
Updater: check whether system() is useable.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/updater/init.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/updater/init.php b/plugins/updater/init.php index ef48858b2..6ee018f74 100644 --- a/plugins/updater/init.php +++ b/plugins/updater/init.php @@ -63,6 +63,20 @@ class Updater extends Plugin { putenv("PATH=" . getenv("PATH") . PATH_SEPARATOR . "/bin" . PATH_SEPARATOR . "/usr/bin"); + array_push($log, "Checking for system() call..."); + + $disabled = explode(',', ini_get('disable_functions')); + foreach ($disabled as $function) { + if ( trim($function) == 'system' ) { + array_push($log, "Can not execute commands with PHP's system() function."); + $stop = true; + } + } + + if ( $stop == true ) { + break; + } + array_push($log, "Checking for tar..."); $system_rc = 0; |