r83254 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83253‎ | r83254 | r83255 >
Date:22:52, 4 March 2011
Author:platonides
Status:ok
Tags:
Comment:
If the unknown element is empty, there won't be a matching END_ELEMENT. There's nothing to peek inside.
Modified paths:
  • /trunk/phase3/includes/media/SVGMetadataExtractor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/SVGMetadataExtractor.php
@@ -161,10 +161,13 @@
162162 * @param String $name of the element that we are reading from
163163 */
164164 private function animateFilter( $name ) {
165 - $this->debug ( "animate filter" );
 165+ $this->debug ( "animate filter for tag $name" );
166166 if( $this->reader->nodeType != XmlReader::ELEMENT ) {
167167 return;
168168 }
 169+ if ( $this->reader->isEmptyElement ) {
 170+ return;
 171+ }
169172 $exitDepth = $this->reader->depth;
170173 $keepReading = $this->reader->read();
171174 while( $keepReading ) {

Status & tagging log