Apply live hack from Wikimedia code base: throw exception on invalid frames in ifeq

This commit is contained in:
Brion Vibber 2008-01-29 01:38:17 +00:00
parent b7b5f0790e
commit e9620129be

View file

@ -126,6 +126,9 @@ class ExtParserFunctions {
}
function ifeqObj( &$parser, $frame, $args ) {
if ( !is_object( $frame ) ) {
throw new MWException( __METHOD__.': invalid frame' );
}
$left = isset( $args[0] ) ? trim( $frame->expand( $args[0] ) ) : '';
$right = isset( $args[1] ) ? trim( $frame->expand( $args[1] ) ) : '';
if ( $left == $right ) {