Check for empty strings in markasread query param

explode always returns an array with one item, even for the empty string
Filter out every possible empty string

Change-Id: I0cf0794c0f3e0eedab7e5626e973d8458b28e46a
This commit is contained in:
Umherirrender 2021-09-19 01:39:22 +02:00
parent 76227585f9
commit a0cb29f1a2

View file

@ -857,7 +857,7 @@ class EchoHooks implements RecentChange_saveHook {
}
// Attempt to mark as read the event IDs in the ?markasread= parameter, if present
$markAsReadIds = explode( '|', $request->getText( 'markasread' ) );
$markAsReadIds = array_filter( explode( '|', $request->getText( 'markasread' ) ) );
$markAsReadWiki = $request->getText( 'markasreadwiki', wfWikiID() );
$markAsReadLocal = !$wgEchoCrossWikiNotifications || $markAsReadWiki === wfWikiID();
if ( $markAsReadIds ) {