File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,12 @@ private static function checkDatabase(object $app): array
174174 if (is_object ($ db ) && method_exists ($ db , 'execute ' )) {
175175 // Tenta executar um SELECT 1
176176 $ result = $ db ->execute ('SELECT 1 ' );
177- $ hasDatabase = ($ result !== false );
177+ $ hasDatabase = (false !== $ result );
178178 } elseif (is_object ($ db ) && method_exists ($ db , 'getPDO ' )) {
179179 // Fallback: tenta usar PDO diretamente
180180 $ pdo = $ db ->getPDO ();
181181 $ stmt = $ pdo ->query ('SELECT 1 ' );
182- $ hasDatabase = ($ stmt !== false );
182+ $ hasDatabase = (false !== $ stmt );
183183 } else {
184184 $ hasDatabase = false ;
185185 $ error = 'Método execute/getPDO não disponível na conexão. ' ;
@@ -196,6 +196,7 @@ private static function checkDatabase(object $app): array
196196 if ($ error ) {
197197 $ status ['error ' ] = $ error ;
198198 }
199+
199200 return $ status ;
200201 }
201202
You can’t perform that action at this time.
0 commit comments