Throw exception if accidentally called recursively
alexglue opened this issue · 2 comments
(For support requests / bug reports, please complete the following - or delete if not applicable.)
Summary of issue
Uncatched fall into infinite crumbs loading.
The complete error message, including file & line numbers
Now we fall into infinite crumbs loading due to crumb parent points to itself;
Software versions
Laravel Breadcrumbs:
last version
Laravel: 5.2
PHP: 7.0.5
Copy of app/Http/breadcrumbs.php
Breadcrumbs::register(
'admin.users.show', function ( Generator $breadcrumbs ) {
$breadcrumbs->parent( 'admin.users.show' );
$breadcrumbs->push( trans( 'admin.models.user.actions.show' ), route( 'admin.users.show' ), [ 'icon' => 'fa-eye' ] );
}
);
Potentially possible, but limiting recursive function calls is already handled by Xdebug so it's not a high priority.
https://xdebug.org/docs/all#max_nesting_level
I'd accept a pull request, but I'm not likely to spend time writing it myself.
Laravel Breadcrumbs is no longer officially maintained
Please see the README file for further details.