r18400 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r18399‎ | r18400 | r18401 >
Date:13:40, 17 December 2006
Author:vyznev
Status:old
Tags:
Comment:
Detect PHP 5.0.x 64-bit bug and abort in WebStart.php; too many things break
mysteriously otherwise (detection code copied from install-utils.inc)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/WebStart.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WebStart.php
@@ -4,6 +4,16 @@
55 # starts the profiler and loads the configuration, and optionally loads
66 # Setup.php depending on whether MW_NO_SETUP is defined.
77
 8+# Test for PHP bug which breaks PHP 5.0.x on 64-bit...
 9+# As of 1.8 this breaks lots of common operations instead
 10+# of just some rare ones like export.
 11+$borked = str_replace( 'a', 'b', array( -1 => -1 ) );
 12+if( !isset( $borked[-1] ) ) {
 13+ echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" .
 14+ "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n";
 15+ die( -1 );
 16+}
 17+
818 # Protect against register_globals
919 # This must be done before any globals are set by the code
1020 if ( ini_get( 'register_globals' ) ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -334,6 +334,8 @@
335335 * (bug 8153) <nowiki> doesn't work in site notice
336336 * (bug 6690) wfMsgNoTrans() transforms messages
337337 * (bug 8274) Wrap edit tools in a <div> with a specified class
 338+* Detect PHP 5.0.x 64-bit bug and abort in WebStart.php; too many things break
 339+ mysteriously otherwise (detection code copied from install-utils.inc)
338340
339341 == Languages updated ==
340342