From e2a9ca1adfa9d5693409566b0b60f07e9f3a114a Mon Sep 17 00:00:00 2001 From: Denis Chenu Date: Fri, 14 Jun 2019 18:20:18 +0200 Subject: [PATCH] Dev: uneeded typecast, but scrutinizer is not happy --- application/models/Survey.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/models/Survey.php b/application/models/Survey.php index 6c53f3625af..63dcce649f3 100755 --- a/application/models/Survey.php +++ b/application/models/Survey.php @@ -936,7 +936,7 @@ public function insertNewSurvey($aData) unset($aData['wishSID']); } if(empty($aData['sid'])) { - $aData['sid'] = randomChars(6, '123456789'); + $aData['sid'] = intval(randomChars(6, '123456789')); } $survey = new self; foreach ($aData as $k => $v) { @@ -947,7 +947,7 @@ public function insertNewSurvey($aData) /* Validate sid : > 1 and unique */ while(!$survey->validate(array('sid'))) { $attempts++; - $survey->sid = randomChars(6, '123456789'); + $survey->sid = intval(randomChars(6, '123456789')); /* If it's happen : there are an issue in server … (or in randomChars function …) */ if($attempts > 50) { throw new Exception("Unable to get a valid survey id after 50 attempts");