GitInfo: Don't try shelling out if it's disabled
authorKunal Mehta <legoktm@member.fsf.org>
Sun, 24 Jun 2018 20:55:43 +0000 (23:55 +0300)
committerKunal Mehta <legoktm@member.fsf.org>
Sun, 24 Jun 2018 20:55:43 +0000 (23:55 +0300)
Bug: T198037
Change-Id: I364f9bc0e78439474101f4b2a171805c91f50a72

includes/GitInfo.php

index 6270b27..363d7b8 100644 (file)
@@ -227,6 +227,7 @@ class GitInfo {
                        $date = false;
                        if ( is_file( $wgGitBin ) &&
                                is_executable( $wgGitBin ) &&
                        $date = false;
                        if ( is_file( $wgGitBin ) &&
                                is_executable( $wgGitBin ) &&
+                               !Shell::isDisabled() &&
                                $this->getHead() !== false
                        ) {
                                $cmd = [
                                $this->getHead() !== false
                        ) {
                                $cmd = [