Allow /-/ in MediaWikiVersionFetcher::fetchVersion
[lhc/web/wiklou.git] / includes / MediaWikiVersionFetcher.php
index 1d59ec3..c3fb486 100644 (file)
@@ -19,7 +19,7 @@ class MediaWikiVersionFetcher {
                $defaultSettings = file_get_contents( __DIR__ . '/DefaultSettings.php' );
 
                $matches = array();
-               preg_match( "/wgVersion = '([0-9a-zA-Z\.]+)';/", $defaultSettings, $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' );
@@ -28,4 +28,4 @@ class MediaWikiVersionFetcher {
                return $matches[1];
        }
 
-}
\ No newline at end of file
+}