andrewgould
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [WP-reCAPTCHA] wp-plugin.php error on line 27Luckily there is a simple fix for this. You need to swap the order of some of the functions around in recaptcha.php and wp-plugin.php.
In both files, the
function __constructblock should come before the function that shares the same name as the class. For example, recaptcha.php had been looking like this:class ReCAPTCHAPlugin extends WPPlugin { private $_saved_error; private $_reCaptchaLib; /** * Php 4 Constructor. * * @param string $options_name */ function ReCAPTCHAPlugin($options_name) { $args = func_get_args(); call_user_func_array(array(&$this, "__construct"), $args); } /** * Php 5 Constructor. * * @param string $options_name */ function __construct($options_name) { parent::__construct($options_name); $this->register_default_options(); // require the recaptcha library $this->_require_library(); // register the hooks $this->register_actions(); $this->register_filters(); }But will now need to look like:
class ReCAPTCHAPlugin extends WPPlugin { private $_saved_error; private $_reCaptchaLib; /** * Php 5 Constructor. * * @param string $options_name */ function __construct($options_name) { parent::__construct($options_name); $this->register_default_options(); // require the recaptcha library $this->_require_library(); // register the hooks $this->register_actions(); $this->register_filters(); } /** * Php 4 Constructor. * * @param string $options_name */ function ReCAPTCHAPlugin($options_name) { $args = func_get_args(); call_user_func_array(array(&$this, "__construct"), $args); }Make sure you make the same type of change to wp-plugin.php too.
Changing line 4067 seems to fix it, though it’s not really addressing the underlying problem.
- $wp_object_cache->cache["simple_fields"] = array(); + @$wp_object_cache->cache["simple_fields"] = array();
Viewing 2 replies - 1 through 2 (of 2 total)