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

Extend template error #1268

Open
sfarleandro opened this issue Apr 8, 2023 · 0 comments
Open

Extend template error #1268

sfarleandro opened this issue Apr 8, 2023 · 0 comments

Comments

@sfarleandro
Copy link

Hello

My custom tags (extended templates) stoped working after upgrade to 3.8.x. Sample example:

index.html:
<F3:CustomTag />

index.php
\Template::instance()->extend('CustomTag', function(){

echo 'Custom Tag rendered';

});

\Template::instance()->render('index.html');

Error:
Internal Server Error

Undefined array key "_customtag"

I found a change on line 302 of file template.php:
$node=&$tree[][strtolower($match[3])];

Old version
$node=&$tree[][$match[3]];

The new version (with strtolower) generate undefined array key error (PHP 8.0)

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

1 participant