X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FGitInfo.php;h=e9e780d53cb6ac943e5713e774fa1e1faf226e09;hb=76617a777176ac1109791929c90bc054c69bcfd1;hp=fb75c256d6ab93871df02512d82efca26b3ecee4;hpb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/GitInfo.php b/includes/GitInfo.php index fb75c256d6..e9e780d53c 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -156,7 +156,7 @@ class GitInfo { * @return bool Whether or not the string looks like a SHA1 */ public static function isSHA1( $str ) { - return !!preg_match( '/^[0-9A-F]{40}$/i', $str ); + return (bool)preg_match( '/^[0-9A-F]{40}$/i', $str ); } /** @@ -227,6 +227,7 @@ class GitInfo { $date = false; if ( is_file( $wgGitBin ) && is_executable( $wgGitBin ) && + !Shell::isDisabled() && $this->getHead() !== false ) { $cmd = [ @@ -306,9 +307,9 @@ class GitInfo { $config = "{$this->basedir}/config"; $url = false; if ( is_readable( $config ) ) { - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $configArray = parse_ini_file( $config, true ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); $remote = false; // Use the "origin" remote repo if available or any other repo if not.