Forums

W3 Total Cache
Array to string conversion notices (9 posts)

  1. vugluskra
    Member
    Posted 11 months ago #

    Please do anything with annoying PHP notices while creating static pages:
    Array to string conversion in \\wp-content\\plugins\\w3-total-cache\\lib\\W3\\Cache.php on line 52
    Page Cache Method: Disk (enhanced).

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. KimJCastleberry
    Member
    Posted 11 months ago #

    /wp-content/plugins/w3-total-cache/lib/W3/Cache.php on line 52

    Similar error seen here. WP 3.2 RC4

  3. KimJCastleberry
    Member
    Posted 11 months ago #

    it doesn't seem to like this bit of code:

    function &instance($engine, $config = array()) {
    static $instances = array();

    $instance_key = sprintf('%s_%s', $engine, md5(implode('', $config)));

    if (!isset($instances[$instance_key])) {
    switch ($engine) {
    case W3TC_CACHE_MEMCACHED:
    require_once W3TC_LIB_W3_DIR . '/Cache/Memcached.php';
    $instances[$instance_key] = & ne

  4. Frederick Townes
    Member
    Posted 10 months ago #

    Are people still having issues with this in the latest release?

  5. vugluskra
    Member
    Posted 10 months ago #

    WP 3.2.1 / TC 0.9.2.3

    [Wed Jul 20 14:04:00 2011] [error] PHP Notice:  Array to string conversion in Cache.php on line 52, referer: /admin.php?page=w3tc_general
    [Wed Jul 20 14:04:29 2011] [error] PHP Notice:  Array to string conversion in Minify.php on line 796, referer: /wp-login.php?loggedout=true
    [Wed Jul 20 14:04:45 2011] [error] PHP Notice:  Array to string conversion in Cache.php on line 52, referer: /
  6. sOliver
    Member
    Posted 10 months ago #

    Installed latest version today. Getting same error .. Is this a critical error?

    PHP Notice: Array to string conversion in /public_html/wp-content/plugins/w3-total-cache/lib/W3/Cache.php on line 52

    Also I wanted to let you know that sometimes it is still using the ?p=xxx codes and fails to rewrite to the correct URL - I believe it only happens when I am logged in but I need to do further testing.

    Last, but not least I would like to ask where you store the index.html for the index page (blog homepage!) .. I can't find it in w3tc/pgcache/..

  7. Frederick Townes
    Member
    Posted 8 months ago #

    Are you still having this issue with 0.9.2.4?

  8. hedgehogsbottom
    Member
    Posted 4 months ago #

    Yes, I'm using 0.9.2.4 and am getting this error. Specifically:-

    [26-Jan-2012 11:05:10] PHP Notice: Array to string conversion in /home/sites/wordpress-mu/web/wp-content/plugins/w3-total-cache/lib/W3/Minify.php on line 810
    [26-Jan-2012 11:05:10] PHP Notice: Array to string conversion in /home/sites/wordpress-mu/web/wp-content/plugins/w3-total-cache/lib/W3/Minify.php on line 810
    [26-Jan-2012 14:13:53] PHP Notice: Array to string conversion in /home/sites/wordpress-mu/web/wp-content/plugins/w3-total-cache/lib/W3/Minify.php on line 810
    [26-Jan-2012 14:13:53] PHP Notice: Array to string conversion in /home/sites/wordpress-mu/web/wp-content/plugins/w3-total-cache/lib/W3/Minify.php on line 810

    etc.

    The function called is
    function _generate_id($sources, $type),

    the line is:-
    $id = substr(md5(implode('', $values)), 0, 6);

    I have the JS and CSS minifiers set to manual (so that I can non-block load the Javascript for example).

    Would it be helpful to debug the values for $sources and $type?

    I'm quite comfy debugging and analysing PHP and Linux matters, so if there's something you (Frederick) would like me to try out and report upon I'd be happy to try and report back.

    All the best,
    Hedgehog.

  9. Frederick Townes
    Member
    Posted 3 months ago #

    Thanks, this is fixed in the next release.

Reply

You must log in to post.

About this Plugin

About this Topic