2017-05-09 94 views
0

目前在我的网站上使用woocommerce上的Wordpress构建了以下错误消息。Woocommerce插件错误消息(PHP)

解析错误:语法错误,意想不到的 '=',期望 ')' /home4/name/public_html/mysite.com/wp-content/plugins/webappick-product-feed-for-woocommerce/includes /classes/class-woo-feed-products.php上线674

这是它与错误指太行,不过,我看不出有什么错误呢?

$imgIds=!empty($ids=$this->getAttributeValue($Id,"_product_image_gallery"))?explode(",",$ids):""; 

任何人都可以说明这条线的错误是什么?

回答

0

empty函数总是期望一个变量作为参数而不是条件。

而不是empty($ids=$this->getAttributeValue($Id,"_product_image_gallery"))尝试empty($this->getAttributeValue($Id,"_product_image_gallery"))应该为你工作。

+0

这给出了以下错误 - “在写入上下文中不能使用方法返回值” –

+0

然后在prev行中执行该操作...但不是在三元运算符中,或者作为空函数的参数 – Alice