• With w3-total-cache activated, I keep getting:

    Error thrown
    
    Cannot use string offset as an array

    in my wp-admin area periodically since getting it working with PHP 7.1 yesterday. The error is severe enough that it does not even end up in the debug log. The only clue I have that it is w3-total-cache is that when I deactivate that plugin only, I do not get the error anymore.
    Thanks,
    Kyle

Viewing 5 replies - 1 through 5 (of 5 total)
  • for catch and fix the error put in the wp-config.php

    define( 'WP_DEBUG', true );
    // this allows you to write error log in /wp-content/debug.log
    define( 'WP_DEBUG_LOG', true );
    Thread Starter kda406

    (@kda406)

    I am already using this to debug in wp-config.php:

    define('WP_DEBUG', true);
    if ( WP_DEBUG ) {
    
            @error_reporting( E_ALL );
            @ini_set( 'log_errors', true );
            @ini_set( 'log_errors_max_len', '0' );
    
            define( 'WP_DEBUG_LOG', true );
            define('WP_DEBUG_DISPLAY', false);
            define( 'CONCATENATE_SCRIPTS', false );
            define( 'SAVEQUERIES', true );
    
    }

    It has caught other warnings and errors very well in the past. But this very severe error is not logged.
    Thanks,
    Kyle

    very strange…. on the community version we have fixed some issue over the official w3tc last release https://github.com/szepeviktor/w3-total-cache-fixed/wiki/Changelog

    but this issue is totally new… try to see if those fixs help you.

    • This reply was modified 7 years, 10 months ago by nigro.simone.
    • This reply was modified 7 years, 10 months ago by nigro.simone.

    @kda406 we’d love to get more info.

    1. So this problem never occurred before but only started happened once you switched to PHP version 7.1?
    2. When you said “…getting it working with PHP 7.1” are you implying you had to do some custom code changes to w3tc?
    3. Does the error message appear after a certain time when navigating in the wp Admin pages or does it appear right away when you log in? Is there a specific page you must visit (e.g. a w3tc page) before it suddenly shows up?
    4. Does w3tc still work correctly despite the error message or are there strange things happening on your site (e.g. minify not working, page caching not working, no more fragment caching)?
    5. When you drop back down to php v7.0 does this problem still occur?

    Thanks for the details. It will hopefully help narrow things down. The hardest part of fixing bugs for us is being able to recreate them on our end so we can see it too. Hence, all the questions (and more to come). When we can’t it’s usually a sign of a server-side configuration problem or plugin(s) conflict.

    Thread Starter kda406

    (@kda406)

    Thanks @nigrosimone but I didn’t want to go down that road.

    Kimberly,
    1) I did not have this problem with PHP 5.3.3, CentOS security patched latest OS release version. It started when I changed to PHP 7.1
    2) ‘getting it working’ was referring to a previous post you helped me solve: php -m
    3) The Error thrown appeared randomly, clicking the dashboard, plugins, or other wp-admin pages. But only with w4tc enabled. IIRC I think I saw it as a user once.
    4) Sorry I cannot answer this one. I was mostly working in the back end and kept getting the error.
    5) This happens to be the solution. I unloaded PHP 7.1 and installed PHP 7.0 this morning. With w3tc enabled, I have not had an error on the site since switching to the older PHP version.

    For now, I’m going to just stick with PHP 7.0.
    Thanks for your help,
    Kyle

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP 7.1 – Error thrown’ is closed to new replies.