Skip to content

Commit

Permalink
Merge pull request #1393 from SemanticMediaWiki/excep
Browse files Browse the repository at this point in the history
Throw exception for an invalid array index
  • Loading branch information
mwjames committed Feb 3, 2016
2 parents 2029d39 + ef2fb43 commit b592207
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/SQLStore/PropertyTableRowDiffer.php
Expand Up @@ -9,6 +9,7 @@
use SMWDIError as DIError;
use InvalidArgumentException;
use SMW\DataItemException;
use RuntimeException;

/**
* @license GNU GPL v2+
Expand Down Expand Up @@ -311,6 +312,11 @@ private function mapToInsertValueFormat( $sid, SemanticData $semanticData ) {
continue;
}

// "Notice: Undefined index"
if ( !isset( $propertyTables[$tableId] ) ) {
throw new RuntimeException( "Unable to find a property table for " . $property->getKey() );
}

$propertyTable = $propertyTables[$tableId];

// not using subject ids, e.g., redirects
Expand Down

0 comments on commit b592207

Please sign in to comment.