Skip to content

Commit

Permalink
Fixed issue #4628: with debug mode enabled, conditions using tokens a…
Browse files Browse the repository at this point in the history
…s source operands can be broken due to a PHP warning breaking Javascript evaluation

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@9171 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
Thibault Le Meur committed Oct 5, 2010
1 parent e5764f7 commit 0645150
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions qanda.php
Expand Up @@ -156,6 +156,11 @@ function retrieveJSidname($cd,$currentgid=null)
{
global $dbprefix, $connect, $dropdownthreshold;

if (preg_match("/^[0-9]+X([0-9]+)X([0-9]+)$/",$cd[2]) == 0)
{ // This is not a true fieldname (for instance a {TOKEN:ATTR..}
// placeholder
return "NoJSidname";
}
//preg_match("/^[0-9]+X([0-9]+)X([0-9]+)$/",$cd[2],$matchFields);
//^^^^^does not seem to work, explode below should
$matchFields = explode('X', $cd[2], 3);
Expand Down

0 comments on commit 0645150

Please sign in to comment.