Skip to content

Commit

Permalink
Merge pull request #76 from humanmade/fix-php81-deprecation-parse-str
Browse files Browse the repository at this point in the history
Fix PHP 8.1 parse_str deprecation warning
  • Loading branch information
roborourke authored Mar 21, 2023
2 parents 41f8775 + 11e3ed9 commit c88848a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/class-tachyon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] ) );
}

Expand Down

0 comments on commit c88848a

Please sign in to comment.