diff --git a/group.php b/group.php
index 4823596dce1..d119191cfad 100644
--- a/group.php
+++ b/group.php
@@ -1096,10 +1096,11 @@ function checkconditions(value, name, type)
$question_template = file_get_contents($thistpl.'/question.pstpl');
- if( (strpos( $question_template , '{QUESTION_ESSENTIALS}') == false) || (strpos( $question_template , '{QUESTION_CLASS}') == false) )
+ if( preg_match( '/\{QUESTION_ESSENTIALS\}/' , $question_template ) === false || preg_match( '/\{QUESTION_CLASS\}/' , $question_template ) === false )
{
// if {QUESTION_ESSENTIALS} is present in the template but not {QUESTION_CLASS} remove it because you don't want id="" and display="" duplicated.
$question_template = str_replace( '{QUESTION_ESSENTIALS}' , '' , $question_template );
+ $question_template = str_replace( '{QUESTION_CLASS}' , '' , $question_template );
echo '
diff --git a/question.php b/question.php
index e317bf8525e..8ea403085c0 100644
--- a/question.php
+++ b/question.php
@@ -512,10 +512,11 @@
$question_template = file_get_contents($thistpl.'/question.pstpl');
- if( (strpos( $question_template , '{QUESTION_ESSENTIALS}') == false) || (strpos( $question_template , '{QUESTION_CLASS}') == false) )
+ if( preg_match( '/\{QUESTION_ESSENTIALS\}/' , $question_template ) === false || preg_match( '/\{QUESTION_CLASS\}/' , $question_template ) === false )
{
// if {QUESTION_ESSENTIALS} is present in the template but not {QUESTION_CLASS} remove it because you don't want id="" and display="" duplicated.
$question_template = str_replace( '{QUESTION_ESSENTIALS}' , '' , $question_template );
+ $question_template = str_replace( '{QUESTION_CLASS}' , '' , $question_template );
echo '
diff --git a/survey.php b/survey.php
index 8f446417ff8..fd69551dc07 100644
--- a/survey.php
+++ b/survey.php
@@ -900,10 +900,11 @@ function checkconditions(value, name, type)
$question_template = file_get_contents($thistpl.'/question.pstpl');
- if( (strpos( $question_template , '{QUESTION_ESSENTIALS}') == false) || (strpos( $question_template , '{QUESTION_CLASS}') == false) )
+ if( preg_match( '/\{QUESTION_ESSENTIALS\}/' , $question_template ) === false || preg_match( '/\{QUESTION_CLASS\}/' , $question_template ) === false )
{
// if {QUESTION_ESSENTIALS} is present in the template but not {QUESTION_CLASS} remove it because you don't want id="" and display="" duplicated.
- $question_template = str_replace( '{QUESTION_ESSENTIALS}' , '' , $question_template );
+ $question_template = str_replace( '{QUESTION_ESSENTIALS}' , '' , $question_template );
+ $question_template = str_replace( '{QUESTION_CLASS}' , '' , $question_template );
echo '