r100965 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100964‎ | r100965 | r100966 >
Date:12:17, 27 October 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
add a check to filter invalid property names and report an error here
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -107,6 +107,7 @@
108108
109109 // See if this property is a special one, such as e.g. "has type".
110110 $propertyDv = SMWPropertyValue::makeUserProperty( $propertyName );
 111+ if ( !$propertyDv->isValid() ) return $propertyDv;
111112 $propertyDi = $propertyDv->getDataItem();
112113 $result = SMWDataValueFactory::newPropertyObjectValue( $propertyDi, $value, $caption );
113114