ApiQueryBase: Fix addWhereFld for PHP 7.2
[lhc/web/wiklou.git] / includes / NoLocalSettings.php
index d299ab6..b8bfd6a 100644 (file)
@@ -20,8 +20,8 @@
  * @file
  */
 
-# bug 30219 : can not use pathinfo() on URLs since slashes do not match
-$matches = array();
+# T32219 : can not use pathinfo() on URLs since slashes do not match
+$matches = [];
 $ext = 'php';
 $path = '/';
 foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
@@ -50,15 +50,16 @@ $templateParser = new TemplateParser();
 
 # Render error page if no LocalSettings file can be found
 try {
+       global $wgVersion;
        echo $templateParser->processTemplate(
                'NoLocalSettings',
-               array(
+               [
                        'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ),
                        'path' => $path,
                        'ext' => $ext,
                        'localSettingsExists' => file_exists( MW_CONFIG_FILE ),
                        'installerStarted' => $installerStarted
-               )
+               ]
        );
 } catch ( Exception $e ) {
        echo 'Error: ' . htmlspecialchars( $e->getMessage() );