Anja Jentzsch has submitted this change and it was merged.
Change subject: Fix fatal error due to unknown exception.
......................................................................
Fix fatal error due to unknown exception.
TermsSqlCache tired to throw an instance of Exception without
specifying a namespace, causing a fatal error. Changed that to
\MWException now.
Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
---
M repo/includes/store/sql/TermSqlCache.php
1 file changed, 5 insertions(+), 2 deletions(-)
Approvals:
Anja Jentzsch: Verified; Looks good to me, approved
diff --git a/repo/includes/store/sql/TermSqlCache.php
b/repo/includes/store/sql/TermSqlCache.php
index 41ca54b..a43376b 100644
--- a/repo/includes/store/sql/TermSqlCache.php
+++ b/repo/includes/store/sql/TermSqlCache.php
@@ -295,11 +295,14 @@
$numericIds = array();
foreach ( $ids as $id ) {
- $numericIds[] = $id->getNumericId();
if ( $id->getEntityType() !== $entityType ) {
- throw new Exception( 'Declared EntityType must
match the actual EntityType of each Entity' );
+ throw new \MWException( "ID " .
$id->getPrefixedId()
+ . " does not refer to an entity of type
$entityType." );
}
+
+ $numericIds[] = $id->getNumericId();
}
+
$entityIdentifiers['term_entity_id'] = $numericIds;
$fields = array(
--
To view, visit https://gerrit.wikimedia.org/r/50171
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idbf67b96a64939e374cffb1f295ecb72137e5575
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Anja Jentzsch <[email protected]>
Gerrit-Reviewer: Jens Ohlig <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits