Fatal error with Herd

I get that error message when I try to locally open my project wird Herd. Before I was updating Herd to 1.22.1.

What is wrong here?

Fatal error: Cannot redeclare dump() (previously declared in phar:///Applications/Herd.app/Contents/Resources/valet/dump.phar/vendor/autoload.php:29) in /Users/…/kirby/config/helpers.php on line 115

Which version of Kirby are you using. From version 3.7 you can set the following in your index.php to disable Kirby’s dump helper:

define('KIRBY_HELPER_DUMP', false);

I am using 3.9.8

like this?

This didn’t help. What do I get wrong?

No, like below. define should be before require:

I don’t have no library or framework installed!

But Laravel Herd uses the Laravel dumper. So you need to add the above to your index.php

like this?

define(‘KIRBY_HELPER_DUMP’, false);

require DIR . ‘/kirby/laravel.php’;

echo (new Kirby)->render();

Ah, you mean “define” before “require” like this:

And `` echo (new kirby)→render(); ’’ at the end, I guess

Sorry to reopen this thread, but is there a solution for this that works with Kirby 2?

I am about upgrade an old site but seeing this error usng Herd. Is the there a K2 equivalent of the above?

I recently updated a Kirby 2 site and simply commented out the dump function in kirby/vendor/getkirby/toolkit/helpers.php. It’s still in line 115 :slight_smile:

1 Like

Thank you @thguenther I will give that a shot.