@@ -120,15 +120,15 @@ public function getItemRating(int $itemid = 0, int $source = 0)
120120 $ ItemRating ['avg_rate_value ' ] = \number_format ($ current_rating / $ count , 2 );
121121 }
122122 if (1 == $ count ) {
123- $ text = \str_replace ('%c ' , $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_1 );
124- $ shorttext = \str_replace ('%c ' , $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_SHORT_1 );
123+ $ text = \str_replace ('%c ' , ( string ) $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_1 );
124+ $ shorttext = \str_replace ('%c ' , ( string ) $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_SHORT_1 );
125125 } else {
126- $ text = \str_replace ('%c ' , $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_X );
127- $ shorttext = \str_replace ('%c ' , $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_SHORT_X );
126+ $ text = \str_replace ('%c ' , ( string ) $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_X );
127+ $ shorttext = \str_replace ('%c ' , ( string ) $ ItemRating ['avg_rate_value ' ], \_MA_MODULEBUILDER_RATING_CURRENT_SHORT_X );
128128 }
129- $ text = \str_replace ('%m ' , $ max_units , $ text );
130- $ text = \str_replace ('%t ' , $ ItemRating ['nb_ratings ' ], $ text );
131- $ shorttext = \str_replace ('%t ' , $ ItemRating ['nb_ratings ' ], $ shorttext );
129+ $ text = \str_replace ('%m ' , ( string ) $ max_units , $ text );
130+ $ text = \str_replace ('%t ' , ( string ) $ ItemRating ['nb_ratings ' ], $ text );
131+ $ shorttext = \str_replace ('%t ' , ( string ) $ ItemRating ['nb_ratings ' ], $ shorttext );
132132 $ ItemRating ['text ' ] = $ text ;
133133 $ ItemRating ['shorttext ' ] = $ shorttext ;
134134 $ ItemRating ['size ' ] = ($ ItemRating ['avg_rate_value ' ] * $ rating_unitwidth ) . 'px ' ;
0 commit comments