Title: PHP 7.1 &#8211; Error thrown
Last modified: January 25, 2017

---

# PHP 7.1 – Error thrown

 *  [kda406](https://wordpress.org/support/users/kda406/)
 * (@kda406)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/)
 * 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)

 *  [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8698855)
 * 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](https://wordpress.org/support/users/kda406/)
 * (@kda406)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8698930)
 * 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
 *  [nigro.simone](https://wordpress.org/support/users/nigrosimone/)
 * (@nigrosimone)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8698965)
 * 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](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 9 years, 4 months ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
    -  This reply was modified 9 years, 4 months ago by [nigro.simone](https://wordpress.org/support/users/nigrosimone/).
 *  [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8700078)
 * [@kda406](https://wordpress.org/support/users/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](https://wordpress.org/support/users/kda406/)
 * (@kda406)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8703383)
 * Thanks [@nigrosimone](https://wordpress.org/support/users/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](https://wordpress.org/support/topic/fatal-error-after-update-to-4-7-1/)
   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.

 * ![](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/)

## Tags

 * [error thrown](https://wordpress.org/support/topic-tag/error-thrown/)
 * [php 7.1](https://wordpress.org/support/topic-tag/php-7-1/)

 * 5 replies
 * 3 participants
 * Last reply from: [kda406](https://wordpress.org/support/users/kda406/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/php-7-1-error-thrown/#post-8703383)
 * Status: not resolved