Katie Horn has submitted this change and it was merged.

Change subject: (FR #1533) fix error in unit tests
......................................................................


(FR #1533) fix error in unit tests

array_intersect became less forgiving in PHP 5.4

Change-Id: Ic725dff6cce8c28e16668d2f5db384e32a4c0175
---
M gateway_common/DataValidator.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved



diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php
index 1dda7cd..53918a6 100644
--- a/gateway_common/DataValidator.php
+++ b/gateway_common/DataValidator.php
@@ -1082,6 +1082,9 @@
                        return true;
                }
 
+               $haystack = array_filter( $haystack, function( $value ) {
+                       return !is_array( $value );
+               } );
                $result = array_intersect( $haystack, $needle );
                if ( !empty( $result ) ) {
                        return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic725dff6cce8c28e16668d2f5db384e32a4c0175
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Adamw <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to