Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

Operator not supported for strings in autoptimizeStyles.php

$
0
0

Replies: 0

After updating to 2.2.0, I got a weird error and the optimization stops completely:

Uncaught Error: [] operator not supported for strings in /…/wp-content/plugins/autoptimize/classes/autoptimizeStyles.php:71

I looked into the specified file and for testing just changed:
$this->dontmove[]="data-noptimize";
to
$this->dontmove ="data-noptimize";
and it worked.

Interesting is, that WordPress on one server had no problems but WordPress on another server did, so I investigated a little further and believe I found it:

PHP 7.1.x -> Error
PHP 7.0.x – > No Error

Just changed the server with errors to 7.0.x and the error’s gone.


Viewing all articles
Browse latest Browse all 67836

Trending Articles