Permalink
Browse files

Fix coding style

  • Loading branch information...
1 parent 7fbad0b commit ce1bf9f764aeed14721c992c3937320a405e136e @flack flack committed Mar 23, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 Package/Captcha/Captcha.php
@@ -219,9 +219,11 @@ public function check($captcha_challenge = false, $captcha_response = false)
throw new Exception('You must set private key provided by reCaptcha');
}
// Skip processing of empty data
- if ((strlen($captcha_challenge) == 0 || strlen($captcha_response) == 0) && isset($_POST['recaptcha_challenge_field']) && isset($_POST['recaptcha_response_field'])) {
- $captcha_challenge = $_POST['recaptcha_challenge_field'];
- $captcha_response = $_POST['recaptcha_response_field'];
+ if (!$captcha_challenge && !$captcha_response) {
+ if (isset($_POST['recaptcha_challenge_field']) && isset($_POST['recaptcha_response_field'])) {
+ $captcha_challenge = $_POST['recaptcha_challenge_field'];
+ $captcha_response = $_POST['recaptcha_response_field'];
+ }
}
// Instance of response object

0 comments on commit ce1bf9f

Please sign in to comment.