From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- includes/installer/PhpBugTests.php | 72 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 includes/installer/PhpBugTests.php (limited to 'includes/installer/PhpBugTests.php') diff --git a/includes/installer/PhpBugTests.php b/includes/installer/PhpBugTests.php new file mode 100644 index 00000000..9cafd150 --- /dev/null +++ b/includes/installer/PhpBugTests.php @@ -0,0 +1,72 @@ +c'; + $xml = '' . htmlspecialchars( $charData ) . ''; + + $parser = xml_parser_create(); + xml_set_character_data_handler( $parser, array( $this, 'chardata' ) ); + $parsedOk = xml_parse( $parser, $xml, true ); + $this->ok = $parsedOk && ( $this->parsedData == $charData ); + } + public function chardata( $parser, $data ) { + $this->parsedData .= $data; + } +} + +/** + * Test for PHP bug #50394 (PHP 5.3.x conversion to null only, not 5.2.x) + * @see http://bugs.php.net/bug.php?id=45996 + * @ingroup PHPBugTests + */ +class PhpRefCallBugTester { + public $ok = false; + + function __call( $name, $args ) { + $old = error_reporting( E_ALL & ~E_WARNING ); + call_user_func_array( array( $this, 'checkForBrokenRef' ), $args ); + error_reporting( $old ); + } + + function checkForBrokenRef( &$var ) { + if ( $var ) { + $this->ok = true; + } + } + + function execute() { + $var = true; + call_user_func_array( array( $this, 'foo' ), array( &$var ) ); + } +} -- cgit v1.2.2