Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Remove wfLogWarning calls and update comment
......................................................................

Remove wfLogWarning calls and update comment

Change-Id: I151e2ef022623a888ef02eff195788d5be99f4b9
---
M lib/includes/ReferencedUrlFinder.php
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/62/80362/1

diff --git a/lib/includes/ReferencedUrlFinder.php 
b/lib/includes/ReferencedUrlFinder.php
index 8a5e07e..9b7982f 100644
--- a/lib/includes/ReferencedUrlFinder.php
+++ b/lib/includes/ReferencedUrlFinder.php
@@ -7,7 +7,11 @@
 use Wikibase\Lib\PropertyNotFoundException;
 
 /**
- * Finds URLs given a list of entities or a list of claims.
+ * Finds URLs given a list of snaks.
+ *
+ * If a snaks property is not found or the type of DataValue
+ * does not match the expected one for URLs, the snak is ignored
+ * silently.
  *
  * @since 0.4
  *
@@ -65,8 +69,6 @@
 
                if ( $snakValue instanceof StringValue ) {
                        $this->foundURLs[] = $snakValue->getValue();
-               } else {
-                       wfLogWarning( 'Unexpected value type for url: ' . 
$snakValue->getType() );
                }
        }
 
@@ -74,9 +76,6 @@
                try {
                        $type = 
$this->propertyDataTypeLookup->getDataTypeIdForProperty( $propertyId );
                } catch ( PropertyNotFoundException $ex ) {
-                       // FIXME: wrong place to stop exception propagation.
-                       // Either do not catch this here or throw a new 
exception instead.
-                       wfLogWarning( 'No data type known for unknown property 
' . $propertyId );
                        return false;
                }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I151e2ef022623a888ef02eff195788d5be99f4b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to