fix(pwa): 🐛 declare before adding array

This commit is contained in:
alistair3149 2023-01-17 16:36:56 -05:00
parent e78ebd7165
commit 68cb9b6c68
No known key found for this signature in database

View file

@ -133,6 +133,7 @@ class ApiWebappManifest extends ApiBase {
$specialPages = [ 'Search', 'Randompage', 'RecentChanges' ]; $specialPages = [ 'Search', 'Randompage', 'RecentChanges' ];
foreach ( $specialPages as $specialPage ) { foreach ( $specialPages as $specialPage ) {
$shortcut = [];
$title = SpecialPage::getSafeTitleFor( $specialPage ); $title = SpecialPage::getSafeTitleFor( $specialPage );
$shortcut['name'] = $title->getBaseText(); $shortcut['name'] = $title->getBaseText();
$shortcut['url'] = $title->getLocalURL(); $shortcut['url'] = $title->getLocalURL();