Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Property.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | $smwdatavalue = null; |
35 | 35 | // FIXME: property should be collection object according to templates |
36 | 36 | // if template/field used |
37 | | - if ( preg_match( '/\{\{.+\}\}/s', $value . $caption ) ) { |
| 37 | + if ( preg_match ( '/\{\{.+\}\}/s', $value . $caption ) ) { |
38 | 38 | $value = $value . ( $caption == '' ? '' : "|{$caption}" ); |
39 | 39 | $caption = ''; |
40 | 40 | } else { |
— | — | @@ -42,6 +42,9 @@ |
43 | 43 | } else { |
44 | 44 | $smwdatavalue = SMWDataValueFactory::newPropertyObjectValue( $user_property, $value, $caption ); |
45 | 45 | } |
| 46 | + if ( count ( $smwdatavalue->getErrors() ) > 0 ) { |
| 47 | + $smwdatavalue = null; |
| 48 | + } |
46 | 49 | } |
47 | 50 | |
48 | 51 | $this->m_user_property = $user_property; |