Yaron Koren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/229200
Change subject: Simplified 'use xpath' return values to simply be strings
......................................................................
Simplified 'use xpath' return values to simply be strings
Change-Id: I71289ca8eec3809e2f949f0e2c55f6042cdbe39b
---
M ED_Utils.php
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ExternalData
refs/changes/00/229200/1
diff --git a/ED_Utils.php b/ED_Utils.php
index 95c6be1..b7549d5 100644
--- a/ED_Utils.php
+++ b/ED_Utils.php
@@ -557,13 +557,20 @@
if ( !$nodes ) {
continue;
}
+
+ // Convert from SimpleXMLElement to string.
+ $nodesArray = array();
+ foreach ( $nodes as $xmlNode ) {
+ $nodesArray[] = (string)$xmlNode;
+ }
+
if ( array_key_exists( $xpath, $edgXMLValues ) ) {
// At the moment, this code will never get
// called, because duplicate values in
// $mappings will have been removed already.
- $edgXMLValues[$xpath] = array_merge(
$edgXMLValues[$xpath], (array)$nodes );
+ $edgXMLValues[$xpath] = array_merge(
$edgXMLValues[$xpath], $nodesArray );
} else {
- $edgXMLValues[$xpath] = (array)$nodes;
+ $edgXMLValues[$xpath] = $nodesArray;
}
}
return $edgXMLValues;
--
To view, visit https://gerrit.wikimedia.org/r/229200
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I71289ca8eec3809e2f949f0e2c55f6042cdbe39b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExternalData
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits