From 4cf8803de94e0982bbb8c5ec81a2b00575fa45bd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Fri, 20 Oct 2023 17:50:31 +0200 Subject: [PATCH] [smileybutton] Add explicit conversion from float to int Address part of https://github.com/friendica/friendica/issues/13157#issuecomment-1771572442 --- smileybutton/smileybutton.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smileybutton/smileybutton.php b/smileybutton/smileybutton.php index fc20888f..1df717b7 100644 --- a/smileybutton/smileybutton.php +++ b/smileybutton/smileybutton.php @@ -90,7 +90,7 @@ function smileybutton_jot_tool(string &$body) for ($x = 0; $x < count($params['texts']); $x++) { $icon = $params['icons'][$x]; $s .= '' . $icon . ''; - if (($x + 1) % (sqrt(count($params['texts'])) + 1) == 0) { + if (($x + 1) % (floor(sqrt(count($params['texts']))) + 1) == 0) { $s .= ''; } }