Index: trunk/phase3/maintenance/install-utils.inc |
— | — | @@ -15,13 +15,13 @@ |
16 | 16 | if( !function_exists( 'version_compare' ) ) { |
17 | 17 | # version_compare was introduced in 4.1.0 |
18 | 18 | echo "Your PHP version is much too old; 4.0.x will _not_ work. 5.0.0 or higher is required. ABORTING.\n"; |
19 | | - die( -1 ); |
| 19 | + die( 1 ); |
20 | 20 | } |
21 | 21 | if( version_compare( phpversion(), '5.0.0' ) < 0 ) { |
22 | 22 | echo "PHP 5.0.0 or higher is required. If PHP 5 is available only when \n". |
23 | 23 | "PHP files have a .php5 extension, please navigate to <a href=\"index.php5\">index.php5</a> \n". |
24 | 24 | "to continue installation. ABORTING.\n"; |
25 | | - die( -1 ); |
| 25 | + die( 1 ); |
26 | 26 | } |
27 | 27 | |
28 | 28 | // Test for PHP bug which breaks PHP 5.0.x on 64-bit... |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | if( !isset( $borked[-1] ) ) { |
33 | 33 | echo "PHP 5.0.x is buggy on your 64-bit system; you must upgrade to PHP 5.1.x\n" . |
34 | 34 | "or higher. ABORTING. (http://bugs.php.net/bug.php?id=34879 for details)\n"; |
35 | | - die( -1 ); |
| 35 | + die( 1 ); |
36 | 36 | } |
37 | 37 | |
38 | 38 | $test = new PhpXmlBugTester(); |
— | — | @@ -40,10 +40,21 @@ |
41 | 41 | "and can cause hidden data corruption in MediaWiki and other web apps.\n" . |
42 | 42 | "Upgrade to PHP 5.2.9 or later and libxml2 2.7.3 or later!\n" . |
43 | 43 | "ABORTING (http://bugs.php.net/bug.php?id=45996 for details).\n"; |
44 | | - die( -1 ); |
| 44 | + die( 1 ); |
45 | 45 | } |
46 | 46 | |
| 47 | + $test = new PhpRefCallBugTester; |
| 48 | + $ok = false; |
| 49 | + call_user_func_array( array( $test, 'test' ), array( &$ok ) ); |
| 50 | + if ( !$ok ) { |
| 51 | + echo "PHP 5.3.1 is not compatible with MediaWiki due to a bug involving\n" . |
| 52 | + "reference parameters to __call. Upgrade to PHP 5.3.2, or downgrade\n" . |
| 53 | + "to PHP 5.3.0 to fix this.\n" . |
| 54 | + "ABORTING (see http://bugs.php.net/bug.php?id=50394 for details)\n"; |
| 55 | + die( 1 ); |
| 56 | + } |
47 | 57 | |
| 58 | + |
48 | 59 | global $wgCommandLineMode; |
49 | 60 | $wgCommandLineMode = true; |
50 | 61 | umask( 000 ); |
— | — | @@ -72,6 +83,15 @@ |
73 | 84 | } |
74 | 85 | } |
75 | 86 | |
| 87 | +/** |
| 88 | + * Test for PHP bug #50394 |
| 89 | + */ |
| 90 | +class PhpRefCallBugTester { |
| 91 | + function __call( $name, $args ) { |
| 92 | + $args[0] = true; |
| 93 | + } |
| 94 | +} |
| 95 | + |
76 | 96 | function readconsole( $prompt = '' ) { |
77 | 97 | static $isatty = null; |
78 | 98 | if ( is_null( $isatty ) ) { |
Index: trunk/phase3/config/Installer.php |
— | — | @@ -419,13 +419,6 @@ |
420 | 420 | <?php |
421 | 421 | } |
422 | 422 | |
423 | | -if( phpversion() === '5.3.1' ) { |
424 | | - $fatal = true; |
425 | | - ?><li class="error"><strong>Fatal: PHP 5.3.1 is not compatible with MediaWiki!</strong> |
426 | | - PHP 5.3.1 is not compatible with MediaWiki due to a <a href="http://news.php.net/php.internals/46389">bug in PHP</a>. Please use PHP 5.3.0, or PHP 5.3.2 or later.</li> |
427 | | - <?php |
428 | | -} |
429 | | - |
430 | 423 | if( $fatal ) { |
431 | 424 | dieout( "Cannot install MediaWiki." ); |
432 | 425 | } |