帮助此错误消息>意外的T_OBJECT_OPERATOR [英] Help with this error message > unexpected T_OBJECT_OPERATOR
本文介绍了帮助此错误消息>意外的T_OBJECT_OPERATOR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面的代码是使用WordPress的simplepie fetch_feed()的rss feed解析器的一部分...
The code below is part of an rss feed parser using WordPress's simplepie fetch_feed()...
代码是:
if ($enclosure = $item->get_enclosure(0))
{
$image_thumb = $item->get_enclosure()->get_link().'screenshot.jpg';
$image = $item->get_enclosure()->get_link().'screenshot-full.jpg';
}
$link = esc_url( strip_tags( $item->get_link() ) );
$content = $item->get_content();
尝试激活出现此代码的主题时,出现以下错误:
Upon trying to activate the theme in which this code appears, I'm getting the following error:
解析错误:语法错误,/home/.../functions.php中第1341行的意外T_OBJECT_OPERATOR
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/.../functions.php on line 1341
第1341行是以$ image_thumb开头的行
Line 1341 is the line that starts with $image_thumb
推荐答案
我的疯狂猜测是,这是PHP 4,它不支持方法链接.
My wild guess is that this is PHP 4, which doesn't support method chaining.
这篇关于帮助此错误消息>意外的T_OBJECT_OPERATOR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文