simplemediacode avatar simplemediacode committed 316dd42

Comments (0)

Files changed (1)

itemprop_review.php

 			$pricerows='';
 			$reviewratingrow='';
 			
-			$itemrating = $reviewrating['rate'];
-			
-			if($reviewonoff['onoff']=="on"){
+			if(isset($reviewrating['rate'])){
+				$itemrating = $reviewrating['rate'];
+			}else{
+				$itemrating = 0;
+			}
+			if(isset($reviewonoff['onoff'])=="on"){
 				if(!$reviewname){$reviewname = $reviewpost->post_title;}
 				if($reviewprice && $reviewcurrency){
 					$pricerows = '<span itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="price" content="'.$reviewprice.'"><meta itemprop="priceCurrency" content="'.$reviewcurrency.'"><link itemprop="availability" href="http://schema.org/InStock"></span>';
 		echo '<tr><th scope="row"><div class="'.$ipwprprefix.'postcbox-label">';
 			echo '<label for="'.$ipwprprefix.'rating">'.__("Rating of item","itempropwp" ).'</label> ';
 		echo '</div></th>';
+		if(!isset($rating['rate'])){
+			$rating['rate'] = 0;
+		}
 		echo '<td><div class="'.$ipwprprefix.'postcbox-input">
 		<select name="'.$ipwprprefix.'rating[rate]" id="'.$ipwprprefix.'reviewonoff">
 			<option value="0"	'.selected($rating['rate'], "0",	false).'>0.0</option>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.