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 ) {
* @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 ) {