Skip to content

Commit

Permalink
Fix PHP 8.2 deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
const-cloudinary committed Feb 9, 2023
1 parent 94516fe commit 21119f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ function fetch_breakpoints($public_id, $srcset_data = array(), $options = array(

$kbytes_step = (int)ceil($bytes_step / 1024);

$width_param = "auto:breakpoints_${min_width}_${max_width}_${kbytes_step}_${max_images}:json";
$width_param = "auto:breakpoints_{$min_width}_{$max_width}_{$kbytes_step}_{$max_images}:json";
// We use Cloudinary::cloudinary_scaled_url function, passing special `width` parameter
$breakpoints_url = Cloudinary::cloudinary_scaled_url($public_id, $width_param, $transformation, $options);

Expand Down Expand Up @@ -827,11 +827,11 @@ function generate_media_attr($media_options)
$media_query_conditions = [];

if (!empty($media_options['min_width'])) {
array_push($media_query_conditions, "(min-width: ${media_options['min_width']}px)");
array_push($media_query_conditions, "(min-width: {$media_options['min_width']}px)");
}

if (!empty($media_options['max_width'])) {
array_push($media_query_conditions, "(max-width: ${media_options['max_width']}px)");
array_push($media_query_conditions, "(max-width: {$media_options['max_width']}px)");
}

if (empty($media_query_conditions)) {
Expand Down

0 comments on commit 21119f3

Please sign in to comment.