Fix nested @hook/@endhook Blade directives by using stack-based approach #6
Loading…
Reference in a new issue
No description provided.
Delete branch "develop"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Previously, nested hooks would cause 'Undefined variable $__hook_name' error
because the $__hook_name variable was being overwritten by inner hooks.
This fix introduces a $__hook_name_stack array to track nested hooks:
This allows hooks to be nested arbitrarily deep, with each @endhook
correctly matching its corresponding @hook.