Skip to content
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.

Commit

Permalink
False type validation (#2)
Browse files Browse the repository at this point in the history
$this->params->get('consent_message', 0) returns a string so it will be ever false.
  • Loading branch information
degobbis authored and zero-24 committed May 4, 2018
1 parent 7805f78 commit 8fb6841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions consentbox.php
Expand Up @@ -85,12 +85,12 @@ public function onContentPrepareForm($form, $data)
*/
public function onSubmitContact(&$contact, &$data)
{
if ($this->params->get('consent_message', 0) === 1)
if ($this->params->get('consent_message', 0) == 1)
{
$data['contact_message'] .= "\r\n\r\n";
$data['contact_message'] .= '--------';
$data['contact_message'] .= "\r\n\r\n";
$data['contact_message'] .= JText::_('PLG_CONTENT_CONSENTBOX_CONSENT_MESSAGE_TEXT');
}
}
}
}

0 comments on commit 8fb6841

Please sign in to comment.