Index: branches/REL1_15/phase3/install-utils.inc |
— | — | @@ -44,6 +44,16 @@ |
45 | 45 | } |
46 | 46 | |
47 | 47 | |
| 48 | + $test = new PhpRefCallBugTester; |
| 49 | + $test->execute(); |
| 50 | + if ( !$test->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 higher, or \n" . |
| 53 | + "downgrade 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 | + } |
| 57 | + |
48 | 58 | global $wgCommandLineMode; |
49 | 59 | $wgCommandLineMode = true; |
50 | 60 | umask( 000 ); |
— | — | @@ -101,6 +111,30 @@ |
102 | 112 | } |
103 | 113 | } |
104 | 114 | |
| 115 | +/** |
| 116 | + * Test for PHP bug #50394 (PHP 5.3.x conversion to null only, not 5.2.x) |
| 117 | + */ |
| 118 | +class PhpRefCallBugTester { |
| 119 | + public $ok = false; |
| 120 | + |
| 121 | + function __call( $name, $args ) { |
| 122 | + $old = error_reporting( E_ALL & ~E_WARNING ); |
| 123 | + call_user_func_array( array( $this, 'checkForBrokenRef' ), $args ); |
| 124 | + error_reporting( $old ); |
| 125 | + } |
| 126 | + |
| 127 | + function checkForBrokenRef( &$var ) { |
| 128 | + if ( $var ) { |
| 129 | + $this->ok = true; |
| 130 | + } |
| 131 | + } |
| 132 | + |
| 133 | + function execute() { |
| 134 | + $var = true; |
| 135 | + call_user_func_array( array( $this, 'foo' ), array( &$var ) ); |
| 136 | + } |
| 137 | +} |
| 138 | + |
105 | 139 | function readconsole( $prompt = '' ) { |
106 | 140 | static $isatty = null; |
107 | 141 | if ( is_null( $isatty ) ) { |
Index: branches/REL1_15/phase3/RELEASE-NOTES |
— | — | @@ -18,8 +18,9 @@ |
19 | 19 | |
20 | 20 | === Changes since 1.15.1 === |
21 | 21 | |
22 | | -* Installer now includes a check for a data corruption issue with certain |
23 | | - versions of libxml2 2.7 and PHP earlier than 5.2.9. |
| 22 | +* The installer now includes a check for a data corruption issue with certain |
| 23 | + versions of libxml2 2.7 and PHP earlier than 5.2.9, and also for a PHP bug |
| 24 | + present in the official release of PHP 5.3.1. |
24 | 25 | * (bug 20239) MediaWiki:Imagemaxsize does not contain anymore a <br /> tag which |
25 | 26 | was displayed to the user |
26 | 27 | * (bug 21150) SQLite no longer raise an error when deleting files |