-
Notifications
You must be signed in to change notification settings - Fork 81
Open
Description
Extending the XoopsCaptcha class requires the getInstance() method be overloaded since the method is static and uses CLASS instead of using get_called_class(). If a new class extends XoopsCaptcha and then attempts to get a new instance, an instance of XoopsCaptcha class is created instead of creating a new instance of the calling class.
/**
* Get Instance
*
* @return XoopsCaptcha
*/
static function getInstance()
{
static $instance;
if (!isset($instance)) {
$class = __CLASS__;
$instance = new $class();
}
return $instance;
}
need to replace $class = CLASS; with $class = get_called_class();
The same issue exists in Xoops 2.5.x series. Obviously this can be circumvented in the new calling class by overloading the getInstance() method, but it shouldn't have to...
Metadata
Metadata
Assignees
Labels
No labels