1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 12:48:24 +01:00

Fix for PHP Warning in PHP 7.1

This commit is contained in:
Cameron 2016-12-16 12:57:19 -08:00
parent f6adda23d8
commit 6008fe5b68
2 changed files with 4 additions and 2 deletions

View File

@ -1422,7 +1422,7 @@ class comment
*/
function getCommentData($amount = '', $from = '', $qry = '', $cdvalid = FALSE, $cdreta = FALSE)
function getCommentData($amount = '', $from = 0, $qry = '', $cdvalid = FALSE, $cdreta = FALSE)
{
if($this->engine != 'e107')

View File

@ -396,13 +396,15 @@ class poll
// $voteArray = array_slice($voteArray, 0, -1);
}
$voteTotal = array_sum($voteArray);
$voteTotal = intval(array_sum($voteArray));
$percentage = array();
if (count($voteArray))
{
foreach ($voteArray as $votes)
{
$votes = intval($votes);
if ($voteTotal > 0)
{
$percentage[] = round(($votes/$voteTotal) * 100, 2);