Skip to content

Commit

Permalink
Merge pull request #101 from mfaber/zerovalue_master
Browse files Browse the repository at this point in the history
Fixed issue #8065: Answer code conversion to '0'
  • Loading branch information
Shnoulle committed Aug 11, 2013
2 parents 6739dfb + 667fb53 commit 3b89c86
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/helpers/common_helper.php
Expand Up @@ -1596,15 +1596,16 @@ function fixMovedQuestionConditions($qid,$oldgid,$newgid) //Function rewrites th
function returnGlobal($stringname,$bRestrictToString=false)
{
$urlParam=Yii::app()->request->getParam($stringname);
if(!$urlParam && $aCookies=Yii::app()->request->getCookies() && $stringname!='sid')
if(!isset($urlParam) && $aCookies=Yii::app()->request->getCookies() && $stringname!='sid')
{
if(isset($aCookies[$stringname]))
{
$urlParam = $aCookies[$stringname];
}
}
$bUrlParamIsArray=is_array($urlParam);
if ($urlParam && (!$bUrlParamIsArray || !$bRestrictToString))

$bUrlParamIsArray=is_array($urlParam);// Needed to array map or if $bRestrictToString
if (isset($urlParam) && $stringname!='' && (!$bUrlParamIsArray || !$bRestrictToString))
{
if ($stringname == 'sid' || $stringname == "gid" || $stringname == "oldqid" ||
$stringname == "qid" || $stringname == "tid" ||
Expand Down

0 comments on commit 3b89c86

Please sign in to comment.