简体   繁体   English

Wordpress主题上载错误:致命错误:无法在写上下文中使用函数返回值

[英]Wordpress theme upload error: Fatal error: Can't use function return value in write context

I'm not a coder, just trying to update my wordpress site! 我不是编码员,只是尝试更新我的wordpress网站! I've bought a theme on Envato called "Birddi". 我在Envato上购买了一个名为“ Birddi”的主题。 When I try to upload my theme, I got this message : 当我尝试上传主题时,收到以下消息:

Fatal error: Can't use function return value in write context in /websites/ik/ikateyou.com/wordpress/wp-content/themes/birddi/inc/template.functions.php on line 1748 致命错误:在第1748行的/websites/ik/ikateyou.com/wordpress/wp-content/themes/birddi/inc/template.functions.php中的写入上下文中无法使用函数返回值

This crashed my whole site and I couldn't get back into the admin area until I deleted the theme file. 这使整个网站崩溃,直到删除主题文件,我才能回到管理区域。 (My site is all messed up with a generic theme now so just ignore it) (我的网站现在都被通用主题弄乱了,所以就忽略它)

Is there any way to fix this? 有没有什么办法解决这一问题? I think this is the line... 我认为这是线...

$video_thumb = !empty(get_the_post_thumbnail_url($zkbirdi_meta_options['zkbirdi_format_video_local']['id'])) ? get_the_post_thumbnail_url($zkbirdi_meta_options['zkbirdi_format_video_local']['id'],'full') : get_the_post_thumbnail_url(get_the_ID(),'full');

Thankyou so much in advance!! 提前谢谢你!!

你为什么不联系主题开发者

Try replacing that line with: 尝试将该行替换为:

$video_thumb = get_the_post_thumbnail_url($zkbirdi_meta_options['zkbirdi_format_video_local']['id']);
$video_thumb = !empty( $video_thumb ) get_the_post_thumbnail_url($zkbirdi_meta_options['zkbirdi_format_video_local']['id'],'full') : get_the_post_thumbnail_url(get_the_ID(),'full');

In earlier versions of PHP empty() should be applied to variables not values. 在早期版本的PHP中,empty()应该应用于变量而不是值。 Alternatively, you may upgrade your version of PHP but that may cause even more problems. 或者,您可以升级PHP版本,但这可能会导致更多问题。 Incidentally, I think your version of PHP may be very old - 5.4 or older. 顺便说一句,我认为您的PHP版本可能很旧-5.4或更旧。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Wordpress错误:致命错误:在以下情况下无法在写入上下文中使用函数返回值: - Wordpress error : Fatal error: Can't use function return value in write context in 致命错误:无法在以下情况的写入上下文中使用函数返回值: - Fatal error: Can't use function return value in write context in 致命错误:无法在以下情况的写入上下文中使用函数返回值: - Fatal error: Can't use function return value in write context in 致命错误:无法在写入上下文中使用函数返回值 - Fatal error: Can't use function return value in write context 致命错误:无法在以下情况的写入上下文中使用函数返回值: - Fatal error: Can't use function return value in write context in 致命错误:无法在 / 中的写入上下文中使用函数返回值 - Fatal error: Can't use function return value in write context in / 致命错误:无法在写入上下文中使用函数返回值 - Fatal error: Can't use function return value in write context 致命错误:无法在以下情况的写入上下文中使用函数返回值: - Fatal error: Can't use function return value in write context in 致命错误:无法在写入上下文中使用函数返回值 - Fatal error: Can't use function return value in write context WordPress致命错误-无法在写入上下文中使用函数返回值 - Wordpress fatal error - Can't use function return value in write context
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM