Hooks::onRecentChangeSave: Don't pass null to explode(), avoiding PHP 8.1 deprecation

Re-done from 3022b0e4e on the dev branch.

Change-Id: Id318ea49113afd02f1e74cf0c7b70ac4bd2ade36
(cherry picked from commit 0bc3b98e5b)
This commit is contained in:
Mark A. Hershberger 2022-05-01 11:39:54 -04:00 committed by Reedy
parent 0bcc65e32e
commit ce2fbebf31

View file

@ -635,7 +635,7 @@ class VisualEditorHooks {
$rc->addTags( 'visualeditor-switched' );
}
$tags = explode( ',', $request->getVal( 'vetags' ) );
$tags = explode( ',', $request->getVal( 'vetags' ) ?? '' );
$tags = array_values( array_intersect( $tags, static::$tags ) );
if ( $tags ) {
$rc->addTags( $tags );