php - can't use function return value in write context - error in line 7 -
i can't understand issue. know question repeated not able understand issue in code.
<?php //review box display function sch_ninja_display_review($postcontent){ global $post; $review=$post; if(get_post_meta($review->id,'review_show',true)=="on"){ if(!empty(get_post_meta($review->id,'review_price',true))){ $price='price:'.get_post_meta($review->id,'review_currency',true).get_post_meta($review->id,'review_price',true); }
line 7: if(!empty(get_post_meta($review->id,'review_price',true))){
empty()
php language construct , supports variables , expressions, , no function calls arguments.
you have assign result of call variable first , empty check so:
$reviewprice = get_post_meta($review->id,'review_price',true); if(!empty($reviewprice)){
Comments
Post a Comment