Index: trunk/phase3/includes/WebStart.php |
— | — | @@ -4,6 +4,16 @@ |
5 | 5 | # starts the profiler and loads the configuration, and optionally loads |
6 | 6 | # Setup.php depending on whether MW_NO_SETUP is defined. |
7 | 7 | |
| 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 | + |
8 | 18 | # Protect against register_globals |
9 | 19 | # This must be done before any globals are set by the code |
10 | 20 | if ( ini_get( 'register_globals' ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -334,6 +334,8 @@ |
335 | 335 | * (bug 8153) <nowiki> doesn't work in site notice |
336 | 336 | * (bug 6690) wfMsgNoTrans() transforms messages |
337 | 337 | * (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) |
338 | 340 | |
339 | 341 | == Languages updated == |
340 | 342 | |