Skip to content

Commit 69def15

Browse files
committed
fixes
1 parent 949790f commit 69def15

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/Mvc/Application.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,17 +529,26 @@ protected function loadAttributeRoutes(): void
529529
$controllerPaths = Registry::getInstance()->get( 'Routing.ControllerPaths' );
530530

531531
// Fall back to neuron.yaml for backward compatibility
532-
if( !$controllerPaths )
532+
// Use === null to distinguish between "not set" and "explicitly empty array"
533+
if( $controllerPaths === null )
533534
{
534535
$controllerPaths = $this->getSetting( 'routing', 'controller_paths' );
535536
}
536537

537-
if( !$controllerPaths || !is_array( $controllerPaths ) )
538+
// If still null or not an array, no controller paths configured
539+
if( $controllerPaths === null || !is_array( $controllerPaths ) )
538540
{
539541
Log::debug( "No controller_paths configured in routing settings" );
540542
return;
541543
}
542544

545+
// If explicitly set to empty array, respect that (don't scan any paths)
546+
if( count( $controllerPaths ) === 0 )
547+
{
548+
Log::debug( "controller_paths explicitly set to empty array, skipping route scanning" );
549+
return;
550+
}
551+
543552
Log::debug( "Found " . count( $controllerPaths ) . " controller path(s) to scan" );
544553

545554
$scanner = new RouteScanner();

0 commit comments

Comments
 (0)