PHP error with get_string() breaks plugin functionality
-
This is referenced in a bunch of different posts about images being broken or caches not reloading, but none of them show the error. Please link other posts to this one for discussion.
Error:
Call to a member function get_string() on array in /usr/local/apache2/htdocs/wp-content/plugins/w3-total-cache/Util_Environment.php on line 1042Offending code is here:
static public function is_w3tc_pro( $config = null ) { $result = $config->get_string( 'plugin.type' ) == 'pro' || $config->get_string( 'plugin.type' ) == 'pro_dev' || Util_Environment::is_w3tc_enterprise( $config ) || ( defined( 'W3TC_PRO' ) && W3TC_PRO ); return $result; }It appears that
$configis not an object but an array.Workaround suggested here is to simply return
falseif you’re not using W3TC Pro:static public function is_w3tc_pro( $config = null ) { return false; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘PHP error with get_string() breaks plugin functionality’ is closed to new replies.