CMS MADE SIMPLE FORGE

Captcha

 

[#11362] PEAR Captcha fatal error

avatar
Created By: Robert Campbell (calguy1000)
Date Submitted: Sun Apr 16 15:48:15 -0400 2017

Assigned To:
Version: None
CMSMS Version: None
Severity: Minor
Resolution: None
State: Open
Summary:
PEAR Captcha fatal error
Detailed Description:
in the pear::CheckAvailability() method in plugins/pear/cm_plugin_pear.php  does
an include_once on a file that does not exist.
This results in notices in some environments (mine, when testing CGBetterForms)
when notices are turned on.

Included is the fixed function.  Though you should also check as to why the
Text/CAPTCHA.php file was not distributed.   Possibly removing this library in
its entirety and replacing it with a stub for compatibility.

function checkAvailability()
{
$ret = (bool) is_file('Text/CAPTCHA.php'); // FILE is not distributed
with the captcha module
if( $ret ) $ret = (bool)@include_once('Text/CAPTCHA.php');  // added if
statement
        $this->setIsAvailable($ret);
	return $ret;
}


History