Blob Blame History Raw
diff -Naurp captcha-2.3.orig/captcha.php captcha-2.3.new/captcha.php
--- captcha-2.3.orig/captcha.php	2019-07-22 12:55:03.994484773 +0200
+++ captcha-2.3.new/captcha.php	2019-07-22 13:03:00.955180952 +0200
@@ -441,7 +441,7 @@ class easy_captcha_fuzzy extends easy_ca
    var $fuzzy = CAPTCHA_FUZZY;
 
    #-- compare
-   function solved($in) {
+   function solved($in=NULL) {
       if ($in) {
          $pw = strtolower($this->solution);
          $in = strtolower($in);
@@ -518,7 +518,7 @@ class easy_captcha_graphic extends easy_
    function output() {
       ob_start();
       ob_implicit_flush(0);
-        imagejpeg($this->img, "", $this->quality);
+        imagejpeg($this->img, NULL, $this->quality);
         $jpeg = ob_get_contents();
       ob_end_clean();
       imagedestroy($this->img);
@@ -895,7 +895,7 @@ class easy_captcha_text_math_formula ext
    }
 
    #-- simple IS-EQUAL check
-   function solved($result) {
+   function solved($result=NULL) {
       return (int)$this->solution == (int)$result;
    }
 
@@ -939,7 +939,7 @@ class easy_captcha_text_math_formula ext
 #-- to disable textual captcha part
 class easy_captcha_text_disable extends easy_captcha {
    var $question = "";
-   function solved($in) {
+   function solved($in=NULL) {
       return false;
    }
 }
@@ -960,7 +960,7 @@ class easy_captcha_persistent_grant exte
    
 
    #-- give ok, if captach had already been solved recently
-   function solved($ignore=0) {
+   function solved($ignore=NULL) {
       if (CAPTCHA_PERSISTENT && isset($_COOKIE[$this->cookie()])) {
          return in_array($_COOKIE[$this->cookie()], array($this->validity_token(), $this->validity_token(-1)));
       }
@@ -1000,7 +1000,7 @@ class easy_captcha_spamfree_no_new_urls
 
    #-- you have to adapt this, to check for newly added URLs only, in Wikis e.g.
    #   - for simple comment submission forms, this default however suffices:
-   function solved($ignore=0) {
+   function solved($ignore=NULL) {
       $r = !preg_match("#(https?://\w+[^/,.]+)#ims", serialize($_GET+$_POST), $uu);
       return $r;
    }