X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FInstaller.php;h=029f67d57a362c6bc7774763aed1b97bb70be966;hb=a479750da672066b4189b115d1141a23d8c5cae3;hp=d51ea2ed1bb4d41b138b0a58cc0496bb3698d115;hpb=7c091e68e9e9f8dcc5c09353671566f24719009b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php index d51ea2ed1b..029f67d57a 100644 --- a/includes/installer/Installer.php +++ b/includes/installer/Installer.php @@ -537,11 +537,7 @@ abstract class Installer { * @return mixed */ public function getVar( $name, $default = null ) { - if ( !isset( $this->settings[$name] ) ) { - return $default; - } else { - return $this->settings[$name]; - } + return $this->settings[$name] ?? $default; } /** @@ -1505,9 +1501,8 @@ abstract class Installer { $data = $registry->readFromQueue( $queue ); $wgAutoloadClasses += $data['autoload']; - $hooksWeWant = isset( $wgHooks['LoadExtensionSchemaUpdates'] ) ? - /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */ - $wgHooks['LoadExtensionSchemaUpdates'] : []; + /** @suppress PhanUndeclaredVariable $wgHooks is set by DefaultSettings */ + $hooksWeWant = $wgHooks['LoadExtensionSchemaUpdates'] ?? []; if ( isset( $data['globals']['wgHooks']['LoadExtensionSchemaUpdates'] ) ) { $hooksWeWant = array_merge_recursive(