diff --git a/src/Controller/ResolveController.php b/src/Controller/ResolveController.php index 8fde91ff..4c206b0f 100644 --- a/src/Controller/ResolveController.php +++ b/src/Controller/ResolveController.php @@ -65,11 +65,13 @@ public function indexAction( \Illuminate\Http\Request $request ) $context = app( 'aimeos.context' )->get( true ); - foreach( self::$fcn as $name => $fcn ) + foreach( array_reverse( self::$fcn ) as $name => $fcn ) { try { - return $fcn( $context, $path ); - } catch( \Exception $e ) {} // not found + return call_user_func_array( $fcn->bindTo( $this, static::class ), [$context, $path] ); + } catch( \Exception $e ) { + if( $e->getCode() !== 404 ) throw $e; + } } abort( 404 );