Commit a2148097 by Scott

Fix functions inside empty() construct

parent 17fca6e9
...@@ -450,7 +450,7 @@ ...@@ -450,7 +450,7 @@
if ($question['isbyuser']) { if ($question['isbyuser']) {
$in['name']=qa_post_text('q_name'); $in['name']=qa_post_text('q_name');
$in['notify'] = !empty(qa_post_text('q_notify')); $in['notify'] = qa_post_text('q_notify') !== null;
$in['email']=qa_post_text('q_email'); $in['email']=qa_post_text('q_email');
} }
...@@ -781,7 +781,7 @@ ...@@ -781,7 +781,7 @@
if ($answer['isbyuser']) { if ($answer['isbyuser']) {
$in['name']=qa_post_text($prefix.'name'); $in['name']=qa_post_text($prefix.'name');
$in['notify'] = !empty(qa_post_text($prefix.'notify')); $in['notify'] = qa_post_text($prefix.'notify') !== null;
$in['email']=qa_post_text($prefix.'email'); $in['email']=qa_post_text($prefix.'email');
} }
...@@ -982,7 +982,7 @@ ...@@ -982,7 +982,7 @@
if ($comment['isbyuser']) { if ($comment['isbyuser']) {
$in['name']=qa_post_text($prefix.'name'); $in['name']=qa_post_text($prefix.'name');
$in['notify'] = !empty(qa_post_text($prefix.'notify')); $in['notify'] = qa_post_text($prefix.'notify') !== null;
$in['email']=qa_post_text($prefix.'email'); $in['email']=qa_post_text($prefix.'email');
} }
......
...@@ -324,7 +324,7 @@ ...@@ -324,7 +324,7 @@
{ {
$in=array( $in=array(
'name' => qa_post_text('a_name'), 'name' => qa_post_text('a_name'),
'notify' => !empty(qa_post_text('a_notify')), 'notify' => qa_post_text('a_notify') !== null,
'email' => qa_post_text('a_email'), 'email' => qa_post_text('a_email'),
'queued' => qa_user_moderation_reason(qa_user_level_for_post($question)) !== false, 'queued' => qa_user_moderation_reason(qa_user_level_for_post($question)) !== false,
); );
...@@ -386,7 +386,7 @@ ...@@ -386,7 +386,7 @@
$in=array( $in=array(
'name' => qa_post_text($prefix.'name'), 'name' => qa_post_text($prefix.'name'),
'notify' => !empty(qa_post_text($prefix.'notify')), 'notify' => qa_post_text($prefix.'notify') !== null,
'email' => qa_post_text($prefix.'email'), 'email' => qa_post_text($prefix.'email'),
'queued' => qa_user_moderation_reason(qa_user_level_for_post($parent)) !== false, 'queued' => qa_user_moderation_reason(qa_user_level_for_post($parent)) !== false,
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment