r91269 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91268‎ | r91269 | r91270 >
Date:16:02, 1 July 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
catch a possible exception
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -644,7 +644,11 @@
645645 'SMW::getInProperties', $this->getSQLOptions( $suboptions, 'smw_sortkey' ) );
646646
647647 foreach ( $res as $row ) {
648 - $result[] = new SMWDIProperty( $row->smw_title );
 648+ try {
 649+ $result[] = new SMWDIProperty( $row->smw_title );
 650+ } catch (SMWDataItemException $e) {
 651+ // has been observed to happen (empty property title); cause unclear; ignore this data
 652+ }
649653 }
650654 } else {
651655 $from = $db->tableName( $proptable->name ) . " AS t1";