Skip to content

Commit

Permalink
Merge pull request #1663 from SemanticMediaWiki/DescriptionFactory
Browse files Browse the repository at this point in the history
Fix var initialization in DescriptionFactory
  • Loading branch information
mwjames committed Jun 18, 2016
2 parents 7e8f912 + f3ae89e commit b79a750
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Query/DescriptionFactory.php
Expand Up @@ -133,6 +133,8 @@ public function newFromDataValue( DataValue $dataValue ) {
if ( $dataValue instanceof MonolingualTextValue ) {
$container = $dataValue->getDataItem();

$value = '';

foreach ( $dataValue->getPropertyDataItems() as $property ) {
foreach ( $container->getSemanticData()->getPropertyValues( $property ) as $val ) {
$value .= ( $property->getKey() == '_LCODE' ? '@' : '' ) . $val->getString();
Expand Down

0 comments on commit b79a750

Please sign in to comment.