File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments