Aude has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/81204


Change subject: allow precision to be null in globe coordinate
......................................................................

allow precision to be null in globe coordinate

Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd
---
M DataValues/src/GlobeCoordinateValue.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/04/81204/1

diff --git a/DataValues/src/GlobeCoordinateValue.php 
b/DataValues/src/GlobeCoordinateValue.php
index cb03d47..753079a 100644
--- a/DataValues/src/GlobeCoordinateValue.php
+++ b/DataValues/src/GlobeCoordinateValue.php
@@ -65,8 +65,8 @@
        }
 
        protected function assertIsPrecision( $precision ) {
-               if ( !is_float( $precision ) && !is_int( $precision ) ) {
-                       throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision' );
+               if ( !is_null( $precision ) && !is_float( $precision ) && 
!is_int( $precision ) ) {
+            throw new IllegalValueException( 'Can only construct 
GlobeCoordinateValue with a numeric precision or null' );
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/81204
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: mw1.22-wmf14
Gerrit-Owner: Aude <aude.w...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to