Skip to content

Commit

Permalink
fixed bugs - division by zero errors possible
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12192 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Jan 25, 2012
1 parent 3c4199f commit 8efe1a6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/controllers/admin/participantsaction.php
Expand Up @@ -251,6 +251,8 @@ function getAttributeInfo_json()
$clang = Yii::app()->lang;
$page = Yii::app()->request->getPost('page');
$limit = Yii::app()->request->getPost('rows');
$limit = isset($limit) ? $limit : 50; //Stop division by zero errors

$records = ParticipantAttributeNames::getAttributes();

$attribute_types = array(
Expand Down Expand Up @@ -953,6 +955,8 @@ function getParticipants_json()
{
$page = Yii::app()->request->getPost('page');
$limit = Yii::app()->request->getPost('rows');
$limit = isset($limit) ? $limit : 50; //Stop division by zero errors

$attid = ParticipantAttributeNames::getAttributeVisibleID();
$participantfields = array('participant_id', 'can_edit', 'firstname', 'lastname', 'email', 'blacklisted', 'surveys', 'language', 'owner_uid');
foreach ($attid as $key => $value)
Expand Down

0 comments on commit 8efe1a6

Please sign in to comment.