Skip to content

Commit

Permalink
Merge pull request #59 from clarifynl/dev
Browse files Browse the repository at this point in the history
Fix undefined array key 'ratio'
  • Loading branch information
Twansparant committed Nov 21, 2023
2 parents ca08eea + 682ebba commit f8f262f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "responsive-pics",
"version": "1.7.6",
"version": "1.7.7",
"private": true,
"scripts": {
"bootstrap": "wpackio-scripts bootstrap",
Expand Down
4 changes: 2 additions & 2 deletions responsive-pics.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: https://responsive.pics
Description: Responsive Pics is a Wordpress tool for resizing images on the fly.
Author: Clarify (previously Booreiland)
Version: 1.7.6
Version: 1.7.7
Author URI: https://clarify.nl
Copyright: Wimer Hazenberg, Toine Kamps
*/
Expand Down Expand Up @@ -38,7 +38,7 @@ function __construct() {

// Variables
define('RESPONSIVE_PICS_DIR', plugin_dir_path(__FILE__));
define('RESPONSIVE_PICS_VERSION', '1.7.6');
define('RESPONSIVE_PICS_VERSION', '1.7.7');
define('RESPONSIVE_PICS_TEXTDOMAIN', 'responsive-pics');

// Init
Expand Down
2 changes: 1 addition & 1 deletion src/class-responsive-pics.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ public static function get_picture($id = null, $sizes = null, $picture_classes =
$sources = isset($definition['sources']) ? $definition['sources'] : [];

foreach ($sources as $source) {
$data_aspectratio = $intrinsic ? ' data-aspectratio="' . $source['ratio'] . '"' : '';
$data_aspectratio = ($intrinsic && isset($source['ratio'])) ? ' data-aspectratio="' . $source['ratio'] . '"' : '';

if (isset($source['breakpoint'])) {
$urls = $source['source1x'];
Expand Down

0 comments on commit f8f262f

Please sign in to comment.