Merge "API: Handle exceptions from ApiBeforeMain hook in a user-friendly manner"
[lhc/web/wiklou.git] / includes / PHPVersionError.php
index 6421350..e6d6ebf 100644 (file)
 
 /**
  * Display something vaguely comprehensible in the event of a totally unrecoverable error.
- * Does not assume access to *anything*; no globals, no autloader, no database, no localisation.
+ * Does not assume access to *anything*; no globals, no autoloader, no database, no localisation.
  * Safe for PHP4 (and putting this here means that WebStart.php and GlobalSettings.php
  * no longer need to be).
  *
  * Calling this function kills execution immediately.
  *
- * @param $type String Which entry point we are protecting. One of:
+ * @param string $type Which entry point we are protecting. One of:
  *   - index.php
  *   - load.php
  *   - api.php
@@ -38,7 +38,7 @@
  * version are hardcoded here
  */
 function wfPHPVersionError( $type ) {
-       $mwVersion = '1.21';
+       $mwVersion = '1.23';
        $minimumVersionPHP = '5.3.2';
 
        $phpVersion = phpversion();
@@ -61,12 +61,12 @@ function wfPHPVersionError( $type ) {
                header( 'Pragma: no-cache' );
 
                $finalOutput = <<<HTML
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns='http://www.w3.org/1999/xhtml' lang='en'>
+<!DOCTYPE html>
+<html lang="en" dir="ltr">
        <head>
+               <meta charset="UTF-8" />
                <title>MediaWiki {$mwVersion}</title>
-               <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
-               <style type='text/css' media='screen'>
+               <style media='screen'>
                        body {
                                color: #000;
                                background-color: #fff;
@@ -112,6 +112,6 @@ HTML;
                $finalOutput = ( $type == 'load.php' ) ? "/* $message */" : $message;
                header( "$protocol 500 MediaWiki configuration Error" );
        }
-       echo( "$finalOutput\n" );
+       echo "$finalOutput\n";
        die( 1 );
 }