Attempt to avoid a warning I got during input:
[lhc/web/wiklou.git] / load.php
index 74af68f..6e82971 100644 (file)
--- a/load.php
+++ b/load.php
  *
  */
 
-// We want error messages to not be interpreted as CSS or JS
-function wfDie( $msg = '' ) {
-       header( $_SERVER['SERVER_PROTOCOL'] . ' 500 MediaWiki configuration Error', true, 500 );
-       echo "/* $msg */";
-       die( 1 );
-}
-
-// Die on unsupported PHP versions
-if( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.2.3' ) < 0 ){
-       $version = htmlspecialchars( $wgVersion );
-       wfDie( "MediaWiki $version requires at least PHP version 5.2.3." );
+// Bail if PHP is too low
+if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.2.3' ) < 0 ) {
+       require( dirname( __FILE__ ) . '/includes/PHPVersionError.php' );
+       wfPHPVersionError( 'load.php' );
 }
 
 if ( isset( $_SERVER['MW_COMPILED'] ) ) {