found bug in post rating

  • In Progress
    Posted in: CrystalSkull  
  • Member
    luna
    December 30, 2016 at 6:23 pm #92165

    I found a bug in the post ratings. When I set a criteria score to 4.5 it would display as 3.5. After taking a look at the post-rating.php file I found the problem. Its in the block at line 251 which is listed below.

    <?php
    if($rating_1 != "0" && $rating_1 == "4.5" && $rating_1_text != "" ){
    ?>
    <li><?php echo  esc_attr($rating_1_text); ?>
    	<span class="score" style="color: <?php echo esc_attr($cat_data["catBG"]); ?>">
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star-half-o"></i>
    		<i class="fa fa-star-o"></i>
    	</span>
    </li>
    <?php } ?>

    The block should read

    <?php
    if($rating_1 != "0" && $rating_1 == "4.5" && $rating_1_text != "" ){
    ?>
    <li><?php echo  esc_attr($rating_1_text); ?>
    	<span class="score" style="color: <?php echo esc_attr($cat_data["catBG"]); ?>">
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star"></i>
    		<i class="fa fa-star-half-o"></i>
    		
    	</span>
    </li>
    <?php } ?>

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.