Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error @stack #199

Open
Ryzz123 opened this issue Nov 2, 2024 · 1 comment
Open

Error @stack #199

Ryzz123 opened this issue Nov 2, 2024 · 1 comment

Comments

@Ryzz123
Copy link

Ryzz123 commented Nov 2, 2024

@stack('scripts-head')

-#1Z#-#2B#scripts-head,#3R#-#4X#-

@xavier-arthur
Copy link

I'm having the same issue and it appears to have been introduced in version 4.16. The problem is related to the following code:

/**
 * Compile the stack statements into the content.
 *
 * @param string $expression
 * @return string
 * @see BladeOne::yieldPushContent
 */
protected function compileStack($expression): string
{
    return $this->phpTagEcho . " \$this->CompileStackFinal$expression; ?>";
}

public function CompileStackFinal($a = null, $b = null): string
{
    return $this->escapeStack0 . $a . ',' . $b . $this->escapeStack1;
}

The CompileStackFinal method is concatenating the regex defined at the top of the class with the @stack expression, but it does not seem to actually push any content to the stack.

I'll look into this further and try to identify a fix. If I manage to resolve it, I'll submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants