Automattic / vip-go-wpcom-compat

VIP Go / WordPress.com Compatibility
https://wpvip.com
2 stars 6 forks source link

Array and string offset access syntax with curly braces is deprecated #46

Closed kasparsd closed 3 years ago

kasparsd commented 4 years ago

We're getting the following notice while running unit tests with PHP 7.4.2:

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/html/wp-content/client-mu-plugins/vip-go-wpcom-compat/wpcom-hooks.php on line 68

which maps to the following line of code:

https://github.com/Automattic/vip-go-wpcom-compat/blob/79bce981b331c7ed9e608f06b2407f976dac9235/wpcom-hooks.php#L68

PHP version:

PHP 7.4.2 (cli) (built: Jan 24 2020 13:44:53) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
    with Xdebug v2.9.1, Copyright (c) 2002-2020, by Derick Rethans

Offset access syntax with curly braces was deprecated in PHP 7.4 https://wiki.php.net/rfc/deprecate_curly_braces_array_access

andrewfleming commented 3 years ago

This was addressed in PR #45