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:
parent
f6adda23d8
commit
6008fe5b68
@ -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')
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user