shippo-php-client icon indicating copy to clipboard operation
shippo-php-client copied to clipboard

PHP7.4 array access violation

Open Nacoma opened this issue 4 years ago • 1 comments

PHP7.4 now triggers a notice (which is commonly converted into an ErrorException) when accessing non-arrayable types (int, float, etc).

This causes an exception when trying to fetch shipping rates on line 35: https://github.com/goshippo/shippo-php-client/blob/e4b577a0f45675db5df54e14877a2a9f463dfcad/lib/Shippo/Util.php#L30-L35

Nacoma avatar Jan 16 '20 16:01 Nacoma

Nacoma did you ever find a work around for this? Edit saw your pull request - thanks

if (is_string($k) && $k[0] == '_') {
                continue;
            }

bobbarn avatar Apr 17 '20 04:04 bobbarn