Jeroen De Dauw has submitted this change and it was merged. Change subject: Remove usage of removed interface ......................................................................
Remove usage of removed interface bug 47171 Change-Id: I136015f2be9b54625041f0947b2ec484d7ef35e3 --- M includes/SM_GeoCoordsValue.php 1 file changed, 5 insertions(+), 8 deletions(-) Approvals: Jeroen De Dauw: Verified; Looks good to me, approved diff --git a/includes/SM_GeoCoordsValue.php b/includes/SM_GeoCoordsValue.php index 91ba5b3..36755b1 100644 --- a/includes/SM_GeoCoordsValue.php +++ b/includes/SM_GeoCoordsValue.php @@ -15,6 +15,7 @@ */ use DataValues\GeoCoordinateValue; use ValueFormatters\GeoCoordinateFormatter; +use ValueParsers\ParseException; class SMGeoCoordsValue extends SMWDataValue { @@ -130,16 +131,12 @@ $options = new \ValueParsers\ParserOptions(); $parser = new \ValueParsers\GeoCoordinateParser( $options ); - $parsedCoords = $parser->parse($coordinates ); - if ( $parsedCoords->isValid() ) { - /** - * @var GeoCoordinateValue $value - */ - $value = $parsedCoords->getValue(); + try { + $value = $parser->parse($coordinates ); $this->m_dataitem = new SMWDIGeoCoord( $value->getLatitude(), $value->getLongitude() ); - - } else { + } + catch ( ParseException $parseException ) { $this->addError( wfMessage( 'maps_unrecognized_coords', $coordinates, 1 )->text() ); // Make sure this is always set -- To view, visit https://gerrit.wikimedia.org/r/58895 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I136015f2be9b54625041f0947b2ec484d7ef35e3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/SemanticMaps Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com> Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits