Cannot redeclare generateOgImage90210() (previously declared in /....site/config/config.php:184)

What I forgot to mention is that two kirby websites are sharing on Kirby directory. So there is

and within both blog.mysite.com as well as mysite.com I have a symbolic link to the kirby dir. The config.php on the other kirby site also includes the function but with the original name generateOgImage. No matter how I rename it (generateOgImage90210 is not a name I would normally use ;)) the error appears.

And no, there is no second declaration in the blog.mysite.com directory:

image

The php error log shows the following:

[30-Jun-2024 14:53:50 Europe/Berlin] PHP Fatal error:  Cannot redeclare generateOgImage90210() (previously declared in /usr/www/users/xxxxxx/site/config/config.php:184) in /usr/www/users/xxxxxxx/site/config/config.php on line 184
[30-Jun-2024 14:53:50 Europe/Berlin] Whoops\Exception\ErrorException: Cannot redeclare generateOgImage90210() (previously declared in /usr/www/users/axxxxxxxx/site/config/config.php:184) in /usr/www/users/xxxxxxxxx/site/config/config.php:184
Stack trace:
#0 /usr/www/users/xxxxxxxxx/kirby/vendor/filp/whoops/src/Whoops/Run.php(510): Whoops\Run->handleError()
#1 [internal function]: Whoops\Run->handleShutdown()
#2 {main}

I am not quite sure when the error started appearing but it was around yesterday when I was implementing hooks and the URL rewrite of removing the “blog” part of the URL as per this thread.