r82051 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82050‎ | r82051 | r82052 >
Date:07:59, 13 February 2011
Author:bawolff
Status:ok
Tags:
Comment:
(bug 27105) Be lenient when given an unordered list when the standard specifies it should be ordered.

Appearently some adobe software doesn't follow their own standard.
Modified paths:
  • /branches/img_metadata/phase3/includes/media/XMP.php (modified) (history)

Diff [purge]

Index: branches/img_metadata/phase3/includes/media/XMP.php
@@ -632,6 +632,11 @@
633633 private function startElementModeSeq( $elm ) {
634634 if ( $elm === self::NS_RDF . ' Seq' ) {
635635 array_unshift( $this->mode, self::MODE_LI );
 636+ } else if ( $elm === self::NS_RDF . ' Bag' ) {
 637+ # bug 27105
 638+ wfDebugLog( 'XMP', __METHOD__ . ' Expected an rdf:Seq, but got an rdf:Bag. Pretending'
 639+ . ' it is a Seq, since some buggy software is known to screw this up.' );
 640+ array_unshift( $this->mode, self::MODE_LI );
636641 } else {
637642 throw new MWException( "Expected <rdf:Seq> but got $elm." );
638643 }

Status & tagging log