Skip to content

Commit

Permalink
Merge pull request #100 from mfaber/zeroconversion
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 21, 2013
2 parents 5d5432d + 81a57d8 commit 97fe301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/helpers/common_helper.php
Expand Up @@ -1549,15 +1549,15 @@ 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(is_null($urlParam) && $aCookies=Yii::app()->request->getCookies() && $stringname!='sid')
{
if(isset($aCookies[$stringname]))
{
$urlParam = $aCookies[$stringname];
}
}
$bUrlParamIsArray=is_array($urlParam);// Needed to array map or if $bRestrictToString
if ($urlParam && (!$bUrlParamIsArray || !$bRestrictToString))
if (!is_null($urlParam) && $stringname!='' && (!$bUrlParamIsArray || !$bRestrictToString))
{
if ($stringname == 'sid' || $stringname == "gid" || $stringname == "oldqid" ||
$stringname == "qid" || $stringname == "tid" ||
Expand Down

0 comments on commit 97fe301

Please sign in to comment.