Jump to content

Error with everywhere review


Christopher Ambler

Recommended Posts

When viewing a review that is done via my everywhere model, I'm getting the following error:

 

Notice: Undefined index: ListingType in /var/www/element67/html/components/com_jreviews/jreviews/views/helpers/rating.php on line 56
Notice: Undefined index: ListingType in /var/www/element67/html/components/com_jreviews/jreviews/views/helpers/rating.php on line 57

 

Looking at $listing that is passed in to overallRatings(), the code below fails because there is no array element called 'ListingType' in the $listing array being passed in:

 

$editor_reviews = $this->Config->getOverride('author_review',$listing['ListingType']['config']);
$user_reviews = $this->Config->getOverride('user_reviews',$listing['ListingType']['config']);

 

Is this something that should be populated from my everywhere model (something I need to do)? Or should this code expect that this array element may be missing and not throw an error (something you need to do)?

Link to comment
×
×
  • Create New...