X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMediaWikiVersionFetcher.php;h=913ae9a50d64e8672c3d1b0a3a67c05236dcf1d2;hb=7d3cd26340de92dcd4768e7a82824c0f5d438fe2;hp=17cb8aa451280ab44390b40d3de5a21a420235b5;hpb=f0edb3e368a5fc69218d20f76f1538b68f37db42;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MediaWikiVersionFetcher.php b/includes/MediaWikiVersionFetcher.php index 17cb8aa451..913ae9a50d 100644 --- a/includes/MediaWikiVersionFetcher.php +++ b/includes/MediaWikiVersionFetcher.php @@ -4,7 +4,6 @@ * Provides access to MediaWiki's version without requiring MediaWiki (or anything else) * being loaded first. * - * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ class MediaWikiVersionFetcher { @@ -18,8 +17,8 @@ class MediaWikiVersionFetcher { public function fetchVersion() { $defaultSettings = file_get_contents( __DIR__ . '/DefaultSettings.php' ); - $matches = array(); - preg_match( "/wgVersion = '([0-9a-zA-Z\.]+)';/", $defaultSettings, $matches ); + $matches = []; + preg_match( "/wgVersion = '([0-9a-zA-Z\.\-]+)';/", $defaultSettings, $matches ); if ( count( $matches ) !== 2 ) { throw new RuntimeException( 'Could not extract the MediaWiki version from DefaultSettings.php' );