Viewing 8 replies - 1 through 8 (of 8 total)
  • Might be same error I just found in Util_Environment.php in function is_w3tc_pro

    PHP Fatal error:  Call to a member function get_string() on array in /var/www/html/wp-content/plugins/w3-total-cache/Util_Environment.php on line 1042
    PHP Stack trace:
    PHP   1. {main}() /var/www/html/wp-cron.php:0
    2. do_action_ref_array() /var/www/html/wp-cron.php:117
    3. call_user_func_array:{/var/www/html/wp-includes/plugin.php:601}() /var/www/html/wp-includes/plugin.php:601
    4. W3TC\\Cdn_Plugin->cron_upload() /var/www/html/wp-includes/plugin.php:601
    5. W3TC\\Cdn_Core->upload() /var/www/html/wp-content/plugins/w3-total-cache/Cdn_Plugin.php:172
    6. W3TC\\CdnEngine_S3_Cf->upload() /var/www/html/wp-content/plugins/w3-total-cache/Cdn_Core.php:184
    7. W3TC\\CdnEngine_S3->upload() /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_S3_Cf.php:102
    8. W3TC\\CdnEngine_S3->_upload() /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_S3.php:116
    9. W3TC\\CdnEngine_Base->_get_headers() /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_S3.php:159
    10. W3TC\\Util_Environment::w3tc_header() /var/www/html/wp-content/plugins/w3-total-cache/CdnEngine_Base.php:395
    11. W3TC\\Util_Environment::is_w3tc_pro() /var/www/html/wp-content/plugins/w3-total-cache/Util_Environment.php:189

    CDN Engine is passing config as an array instead of an object

    change function

    	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;
    	}

    in my case i dont have pro version so changed function too

    	static public function is_w3tc_pro( $config = null ) {
    		return false;
    	}

    thats a bit of a hack though, the error is actually in CdnENgine code and there may be still other issues

    Thread Starter kanojia

    (@kanojia)

    u gave it in hard way, bro, tell me in easy , way what do do . as m not aware of coding and php thing, plz tell me in easy way?

    Sorry, it’s a bug in the code, if you cant modify the php you will have to uninstall the plugin and install the previous version until W3TC release a fixed version

    Thread Starter kanojia

    (@kanojia)

    okay , m downloading the old version

    • This reply was modified 9 years, 6 months ago by kanojia.

    ok

    • This reply was modified 9 years, 6 months ago by karlpietsch.
    Thread Starter kanojia

    (@kanojia)

    the new version came but still getting same error

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error While Purging Caches’ is closed to new replies.