From 8b46714f6666e12966a8ac51d1f65dd4e72f3e1c Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 7 Nov 2008 16:38:01 +0000 Subject: [PATCH] Check for PHP 5.0.x bug *after* checking for PHP 4, so that we don't claim that the user needs to upgrade from 5.0 to 5.1 when in fact they're running PHP 4. --- includes/WebStart.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/includes/WebStart.php b/includes/WebStart.php index c569bb2ae0..edc58cb3a2 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -4,16 +4,6 @@ # starts the profiler and loads the configuration, and optionally loads # Setup.php depending on whether MW_NO_SETUP is defined. -# Test for PHP bug which breaks PHP 5.0.x on 64-bit... -# As of 1.8 this breaks lots of common operations instead -# of just some rare ones like export. -$borked = str_replace( 'a', 'b', array( -1 => -1 ) ); -if( !isset( $borked[-1] ) ) { - echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . - "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n"; - die( -1 ); -} - # Protect against register_globals # This must be done before any globals are set by the code if ( ini_get( 'register_globals' ) ) { @@ -92,6 +82,16 @@ if ( !function_exists( 'version_compare' ) exit; } +# Test for PHP bug which breaks PHP 5.0.x on 64-bit... +# As of 1.8 this breaks lots of common operations instead +# of just some rare ones like export. +$borked = str_replace( 'a', 'b', array( -1 => -1 ) ); +if( !isset( $borked[-1] ) ) { + echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . + "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n"; + exit; +} + # Start the autoloader, so that extensions can derive classes from core files require_once( "$IP/includes/AutoLoader.php" ); -- 2.20.1