@@ -60,15 +60,15 @@ public function loadCommands(
6060 // Variables utilized by downstream `require_once */register_command.php` files (i.e. core)
6161 $ application = $ this ->application ;
6262 // State flags used to determine which commands to load, checks to do, and warnings/errors to show.
63- $ installed = $ this ->config ->getSystemValueBool ('installed ' , false );
64- $ maintenance = $ installed && $ this ->config ->getSystemValueBool ('maintenance ' , false );
65- $ needUpgrade = $ installed && \OCP \Util::needUpgrade ();
63+ $ installed = ( bool ) $ this ->config ->getSystemValueBool ('installed ' , false );
64+ $ maintenance = ( bool ) ( $ installed && $ this ->config ->getSystemValueBool ('maintenance ' , false ) );
65+ $ needUpgrade = ( bool ) ( $ installed && \OCP \Util::needUpgrade () );
6666 /**
6767 * @var bool $debug Used by core/register_command.php (required file reads this local)
6868 * @psalm-suppress UnusedVariable
6969 * @noinspection PhpUnusedLocalVariableInspection
7070 */
71- $ debug = $ this ->config ->getSystemValueBool ('debug ' , false );
71+ $ debug = ( bool ) $ this ->config ->getSystemValueBool ('debug ' , false );
7272
7373 // Add and handle `--no-warnings` by default regardless of command
7474 $ inputDefinition = $ application ->getDefinition ();
@@ -98,7 +98,8 @@ public function loadCommands(
9898 $ this ->writeNotInstalledInfo ($ input , $ output );
9999 } elseif ($ maintenance ) {
100100 $ this ->writeMaintenanceModeInfo ($ input , $ output );
101- } elseif ($ installed ) {
101+ } else {
102+ // Normal installed path
102103 $ this ->loadAppCommands ($ input , $ output );
103104 }
104105 }
0 commit comments