From 11e3ed91130b60fe7aaf5573d60b8fc1c60dd49a Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Mon, 20 Mar 2023 16:38:17 +0000 Subject: [PATCH] Fix PHP 8.1 parse_str deprecation warning Fixes #75 --- inc/class-tachyon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/class-tachyon.php b/inc/class-tachyon.php index a652d10..db6576a 100644 --- a/inc/class-tachyon.php +++ b/inc/class-tachyon.php @@ -801,7 +801,7 @@ public function filter_srcset_array( $sources, $size_array, $image_src, $image_m // If the image_src is a tahcyon url, add it's params // to the srcset images too. if ( strpos( $image_src, TACHYON_URL ) === 0 ) { - parse_str( parse_url( $image_src, PHP_URL_QUERY ), $image_src_args ); + parse_str( parse_url( $image_src, PHP_URL_QUERY ) ?? '', $image_src_args ); $args = array_merge( $args, array_intersect_key( $image_src_args, [ 'gravity' => true ] ) ); }