admin管理员组文章数量:1332322
I've finally managed to upgrade a WP site from v5.0 to v5.4. The only issue left is when I create an empty functions.php
file I get 500 error.
Does someone have an idea why is that? Thanks.
Update:
My goal is to place the following into functions.php
:
function my_acf_init() {
acf_update_setting('google_api_key', $_ENV['GOOGLE_MAPS_API_KEY']);
}
add_action('acf/init', 'my_acf_init');
I've finally managed to upgrade a WP site from v5.0 to v5.4. The only issue left is when I create an empty functions.php
file I get 500 error.
Does someone have an idea why is that? Thanks.
Update:
My goal is to place the following into functions.php
:
function my_acf_init() {
acf_update_setting('google_api_key', $_ENV['GOOGLE_MAPS_API_KEY']);
}
add_action('acf/init', 'my_acf_init');
Share
Improve this question
edited Jul 8, 2020 at 9:12
haxpanel
asked Jul 7, 2020 at 17:00
haxpanelhaxpanel
15710 bronze badges
6
|
Show 1 more comment
1 Answer
Reset to default 0I've managed to print the error message by adding the following to the functions.php
:
function exception_handler($exception) {
echo "Uncaught exception: " , $exception->getMessage(), "\n";
}
set_exception_handler('exception_handler');
For some reason logs did not include the error details before.
The error is call to undefined function is_blog_installed()
which I have no idea why's that. :D
本文标签: 500 error after upgrading from 50 to 54 and adding empty functionsphp
版权声明:本文标题:500 error after upgrading from 5.0 to 5.4 and adding empty functions.php 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742266868a2443567.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
<?php
as the first line. – jdm2112 Commented Jul 7, 2020 at 17:06functions.php
obviously. I have gradually removed its content to see where it breaks. I wanna add anadd_action
call to inject env variable value to Advanced Custom Fields. – haxpanel Commented Jul 8, 2020 at 9:02