Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81234
Change subject: Fix call to non-existing method in error case. ...................................................................... Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/34/81234/1 diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index e706600..e6a6cbc 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -49,6 +49,10 @@ // TODO: update this code to obtain the string formatter as soon as corresponding changes // in the DataTypes library have been made. + if ( $dataValue->getType() === 'bad' ) { + throw new IllegalValueException( $dataValue->getReason() ); + } + $valueFormatters = $dataType->getFormatters(); $valueFormatter = reset( $valueFormatters ); -- To view, visit https://gerrit.wikimedia.org/r/81234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf11 Gerrit-Owner: Aude <aude.w...@gmail.com> Gerrit-Reviewer: Daniel Kinzler <daniel.kinz...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits