Skip to content

Commit

Permalink
fix php warning
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan-shafi committed Feb 4, 2024
1 parent adcee79 commit c3f3d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/blocks/review/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function ub_render_review_block($attributes, $block_content, $block_instance){
break;
}

$schema_json_content = '{
$schema_json_content = '{
"@context": "http://schema.org/",
"@type": "Review",' .
($useSummary ? '"reviewBody": "' . ub_filterJsonldString($summaryDescription) . '",' : '') .
Expand All @@ -153,7 +153,7 @@ function ub_render_review_block($attributes, $block_content, $block_instance){
'},
"reviewRating":{
"@type": "Rating",
"ratingValue": "' . ($average % 1 === 0 ? $average : number_format($average, 1, '.', '')) . '",
"ratingValue": "' . ((int)$average % 1 === 0 ? $average : number_format($average, 1, '.', '')) . '",
"bestRating": "' . ($valueType === 'star' ? $starCount : '100') . '"
},
"author":{
Expand Down

0 comments on commit c3f3d06

Please sign in to comment.