Title: Error While Purging Caches
Last modified: September 29, 2016

---

# Error While Purging Caches

 *  [kanojia](https://wordpress.org/support/users/kanojia/)
 * (@kanojia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/)
 * I’m using W3 Total Cache, i tried to purge all caches then i got an error , which
   i shared in below attachment. [Error](http://prnt.sc/cnmrqa)

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

 *  [karlpietsch](https://wordpress.org/support/users/karlpietsch/)
 * (@karlpietsch)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233255)
 * 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;
       	}
       ```
   
 *  [karlpietsch](https://wordpress.org/support/users/karlpietsch/)
 * (@karlpietsch)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233261)
 * thats a bit of a hack though, the error is actually in CdnENgine code and there
   may be still other issues
 *  Thread Starter [kanojia](https://wordpress.org/support/users/kanojia/)
 * (@kanojia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233288)
 * 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?
 *  [karlpietsch](https://wordpress.org/support/users/karlpietsch/)
 * (@karlpietsch)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233292)
 * 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
 *  [karlpietsch](https://wordpress.org/support/users/karlpietsch/)
 * (@karlpietsch)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233298)
 * [https://downloads.wordpress.org/plugin/w3-total-cache.0.9.4.1.zip](https://downloads.wordpress.org/plugin/w3-total-cache.0.9.4.1.zip)
 *  Thread Starter [kanojia](https://wordpress.org/support/users/kanojia/)
 * (@kanojia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233319)
 * okay , m downloading the old version
    -  This reply was modified 9 years, 8 months ago by [kanojia](https://wordpress.org/support/users/kanojia/).
 *  [karlpietsch](https://wordpress.org/support/users/karlpietsch/)
 * (@karlpietsch)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8233337)
 * ok
    -  This reply was modified 9 years, 8 months ago by [karlpietsch](https://wordpress.org/support/users/karlpietsch/).
 *  Thread Starter [kanojia](https://wordpress.org/support/users/kanojia/)
 * (@kanojia)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8238594)
 * 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.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [kanojia](https://wordpress.org/support/users/kanojia/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/error-while-purging-caches/#post-8238594)
 * Status: not resolved