Rating extension fixed again

Uploading caused a really nasty bug where uploading an image caused a
php error due to typing issues. Solved that by just type casting upon
pass. Better solution probably needs to be looked into.
This commit is contained in:
Your Name 2022-08-14 11:09:32 -05:00
parent c83e13bd51
commit 734318c1c6

View File

@ -304,7 +304,7 @@ class Ratings extends Extension
$ratings = array_intersect(str_split($ratings), Ratings::get_user_class_privs($user));
$rating = $ratings[0];
$image = Image::by_id($event->image_id);
$re = new RatingSetEvent($image, $rating);
$re = new RatingSetEvent($image, strval($rating));
send_event($re);
}
}