MaxSem has submitted this change and it was merged.
Change subject: Anonymize nested function to fix PHP fatal on multiple
executions
......................................................................
Anonymize nested function to fix PHP fatal on multiple executions
Change-Id: Id5be2aec43dbc2c1acdf92309eba982fd9967773
---
M includes/skins/SkinMobileBase.php
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
MaxSem: Verified; Looks good to me, approved
diff --git a/includes/skins/SkinMobileBase.php
b/includes/skins/SkinMobileBase.php
index 936c98d..b62e2d8 100644
--- a/includes/skins/SkinMobileBase.php
+++ b/includes/skins/SkinMobileBase.php
@@ -159,11 +159,11 @@
* @return Array
*/
public function mobilizeUrls( $urls ) {
- function fn( $url ) {
- $ctx = MobileContext::singleton();
- $url['href'] = $ctx->getMobileUrl( $url['href'] );
- return $url;
- }
- return array_map( 'fn', $urls );
+ return array_map( function( $url ) {
+ $ctx = MobileContext::singleton();
+ $url['href'] = $ctx->getMobileUrl( $url['href']
);
+ return $url;
+ },
+ $urls );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/63892
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id5be2aec43dbc2c1acdf92309eba982fd9967773
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: awjrichards <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: awjrichards <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits