X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Futils%2FExecutableFinder.php;h=78b3f8e29b3a60c15eda5621edf2d940549e9203;hb=95797de3d623d5a5f48cf82edf502a2296bdc257;hp=93f635d9a6b872f4e2c0ec0c086231ed549a8e5a;hpb=2b7fbceb23a4737de36cfc48d542a21dd6f53a7a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/utils/ExecutableFinder.php b/includes/utils/ExecutableFinder.php index 93f635d9a6..78b3f8e29b 100644 --- a/includes/utils/ExecutableFinder.php +++ b/includes/utils/ExecutableFinder.php @@ -62,9 +62,9 @@ class ExecutableFinder { protected static function findExecutable( $path, $name, $versionInfo = false ) { $command = $path . DIRECTORY_SEPARATOR . $name; - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $file_exists = is_executable( $command ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( $file_exists ) { if ( !$versionInfo ) { @@ -94,6 +94,11 @@ class ExecutableFinder { * @return bool|string */ public static function findInDefaultPaths( $names, $versionInfo = false ) { + if ( Shell::isDisabled() ) { + // If we can't shell out, there's no point looking for executables + return false; + } + $paths = self::getPossibleBinPaths(); foreach ( (array)$names as $name ) { foreach ( $paths as $path ) {