Skip to content

Commit

Permalink
Fixed answer options save. Added an error message in dbExecuteAssoc m…
Browse files Browse the repository at this point in the history
…ethod for debugging purpose.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12160 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
sachdeva-shubham committed Jan 22, 2012
1 parent 9f3c042 commit 65152d7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions application/helpers/database_helper.php
Expand Up @@ -15,7 +15,7 @@
*/
function dbExecuteAssoc($sql,$inputarr=false,$silent=false)
{

$error = '';
try {
if($inputarr)
{
Expand All @@ -27,10 +27,14 @@ function dbExecuteAssoc($sql,$inputarr=false,$silent=false)

}
} catch(CDbException $e) {
$error = $e->getMessage();
$dataset=false;
}

if (!$silent && !$dataset) { safeDie('Error executing query in dbExecuteAssoc:'.$sql); }
if (!$silent && !$dataset)
{
safeDie('Error executing query in dbExecuteAssoc:'.$error);
}
return $dataset;
}

Expand Down
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -5363,7 +5363,7 @@ public static function UpgradeQuestionAttributes($changeDB=false,$surveyid=NULL,
// now update the datbase
foreach ($queries as $query)
{
db_execute_assoc($query);
dbExecuteAssoc($query);
}
return $queries;
}
Expand Down

0 comments on commit 65152d7

Please sign in to comment.