Merge "Follow-up I68179974: Remove from 1.33 RL, backported to 1.32"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index d51ea2e..20661f2 100644 (file)
@@ -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;
        }
 
        /**
@@ -698,7 +694,7 @@ abstract class Installer {
                                'enableSectionEditLinks' => false,
                                'unwrap' => true,
                        ] );
-               } catch ( MediaWiki\Services\ServiceDisabledException $e ) {
+               } catch ( Wikimedia\Services\ServiceDisabledException $e ) {
                        $html = '<!--DB access attempted during parse-->  ' . htmlspecialchars( $text );
                }
 
@@ -1468,6 +1464,7 @@ abstract class Installer {
        /**
         * Installs the auto-detected extensions.
         *
+        * @suppress SecurityCheck-OTHER It thinks $exts/$IP is user controlled but they are not.
         * @return Status
         */
        protected function includeExtensions() {
@@ -1505,9 +1502,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(