bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Extend template error

sfarleandro opened this issue · comments

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)