From 43c46ae6d975f386421fe60b802411dec93e228a 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 .= ''; } }