mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-27 09:10:00 +00:00
Use php null coalesce operator ??
Change-Id: I50244cd16f2c30bacc90421fa9218a8bf454ca6a
This commit is contained in:
parent
5b70405237
commit
5ef5287267
|
@ -170,8 +170,7 @@ class TemplateDataBlob {
|
|||
|
||||
// Root.format
|
||||
if ( isset( $data->format ) && $data->format !== null ) {
|
||||
$f = isset( self::$formats[$data->format] ) ? self::$formats[$data->format] :
|
||||
$data->format;
|
||||
$f = self::$formats[$data->format] ?? $data->format;
|
||||
if (
|
||||
!is_string( $f ) ||
|
||||
!preg_match( '/^\n?\{\{ *_+\n? *\|\n? *_+ *= *_+\n? *\}\}\n?$/', $f )
|
||||
|
|
Loading…
Reference in a new issue