getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.32k stars 168 forks source link

[3.7.0-rc.1] Error 500 after update: PHP Fatal error: Cannot redeclare e() #4381

Closed wdebusschere closed 2 years ago

wdebusschere commented 2 years ago

Description

After update:

PHP Fatal error: Cannot redeclare e() (previously declared in /var/www/html/sitename/vendor/illuminate/support/helpers.php:108)

Your setup

Kirby Version
3.7.0-rc.1

Additional context
2 plugins: afbora/blade and pedroborges/meta-tags

distantnative commented 2 years ago

It seems like one of your composer dependencies is registering a global function with the same name as Kirby's core functions (e()). Before 3.7, other libraries would just overwrite Kirby's functions which could lead to problems that were really hard to debug (not knowing why that function suddenly would behave differently).

So from 3.7 onwards, you need to set the constant KIRBY_HELPER_E to false if you want to allow another library/code to define their e() function and not Kirby its own.

wdebusschere commented 2 years ago

Caused by https://github.com/afbora/kirby-blade/issues/20