'PHP Fatal error: Uncaught Error: Cannot access property started with '\\0'

So I'm using Timber v0.22.5. I have it currently running on my local and a dev environment right now. Everything is running great no issues. Both environments are running PHP 5.5.9.

I just migrated it to my production server which is running PHP 7.0. I am now getting the following error from Timber.

Fatal error: Uncaught Error: Cannot access property started with '\0' in /var/www/html/wp-content/plugins/timber-library/lib/timber-core.php:67

I'm not sure what exactly else is different between the environments other than different versions of PHP. I cannot update to Timber v1 because well the guide seems to suggest not doing that because of some backwards compatibility issues.

I'm going to try installing PHP 5.5.9 and see if that does the trick but was wondering if anyone else was having this issue.

Thanks!



Solution 1:[1]

This will be happened if you use the latest version of "Better Search and Replace" plugin too. You should be able to fix by trimming the key:

https://github.com/deliciousbrains/better-search-replace/issues/71

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 zawhtut