[smileybutton] Add explicit conversion from float to int
[friendica-addons.git/.git] / smileybutton / smileybutton.php
index fc20888..1df717b 100644 (file)
@@ -90,7 +90,7 @@ function smileybutton_jot_tool(string &$body)
        for ($x = 0; $x < count($params['texts']); $x++) {
                $icon = $params['icons'][$x];
                $s .= '<td onclick="smileybutton_addsmiley(\'' . $params['texts'][$x] . '\')">' . $icon . '</td>';
-               if (($x + 1) % (sqrt(count($params['texts'])) + 1) == 0) {
+               if (($x + 1) % (floor(sqrt(count($params['texts']))) + 1) == 0) {
                        $s .= '</tr><tr>';
                }
        }