Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php |
— | — | @@ -597,7 +597,7 @@ |
598 | 598 | $query->jointable = $proptable->name; |
599 | 599 | |
600 | 600 | if ( $property->isInverse() ) { // see if we can support inverses by inverting the proptable data |
601 | | - if ( ( count( $proptable->objectfields ) == 1 ) && ( $proptable->objectfields[0] == 'p' ) ) { |
| 601 | + if ( ( count( $proptable->objectfields ) == 1 ) && ( reset( $proptable->objectfields ) == 'p' ) ) { |
602 | 602 | $keys = array_keys( $proptable->objectfields ); |
603 | 603 | $query->joinfield = $query->alias . '.' . $keys[0]; |
604 | 604 | $objectfields = array( 's_id' => 'p' ); |