Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QP_Distributable.php |
— | — | @@ -161,11 +161,15 @@ |
162 | 162 | |
163 | 163 | // print all result rows |
164 | 164 | while ( $row = $res->getNext() ) { |
165 | | - $name = $row[0]->getNextDataValue()->getShortWikiText(); |
| 165 | + $dataValue = $row[0]->getNextDataValue(); |
166 | 166 | |
167 | | - foreach ( $row as $field ) { |
168 | | - while ( ( /* SMWDataItem */ $dataItem = $field->getNextDataItem() ) !== false ) { |
169 | | - $this->addNumbersForDataItem( $dataItem, $values, $name ); |
| 167 | + if ( $dataValue !== false ) { |
| 168 | + $name = $dataValue->getShortWikiText(); |
| 169 | + |
| 170 | + foreach ( $row as $field ) { |
| 171 | + while ( ( /* SMWDataItem */ $dataItem = $field->getNextDataItem() ) !== false ) { |
| 172 | + $this->addNumbersForDataItem( $dataItem, $values, $name ); |
| 173 | + } |
170 | 174 | } |
171 | 175 | } |
172 | 176 | } |