diff --git a/ext/rating/main.php b/ext/rating/main.php index 9ad774152..d02f5e27b 100644 --- a/ext/rating/main.php +++ b/ext/rating/main.php @@ -225,7 +225,9 @@ public function onImageInfoSet(ImageInfoSetEvent $event) public function onParseLinkTemplate(ParseLinkTemplateEvent $event) { - $event->replace('$rating', $this->rating_to_human($event->image->rating)); + if(!is_null($event->image->rating)) { + $event->replace('$rating', $this->rating_to_human($event->image->rating)); + } } public function onHelpPageBuilding(HelpPageBuildingEvent $event)