Skip to content

Commit

Permalink
fix: Prevented an error initializing array
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmolinacano committed Dec 10, 2024
1 parent 219cd8a commit e4d771c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doofinder-for-woocommerce/doofinder-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: DOOFINDER Search and Discovery for WP & WooCommerce
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
* Version: 2.5.19
* Version: 2.5.20
* Requires at least: 5.6
* Requires PHP: 7.0
* Author: Doofinder
Expand Down Expand Up @@ -40,7 +40,7 @@ class Doofinder_For_WordPress {
* @var string
*/

public static $version = '2.5.19';
public static $version = '2.5.20';

/**
* The only instance of Doofinder_For_WordPress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,10 @@ private function get_all_image_sizes() {

$default_image_sizes = get_intermediate_image_sizes();

$image_sizes = array();

foreach ( $default_image_sizes as $size ) {
$image_sizes[ $size ] = array();
$image_sizes[ $size ]['width'] = intval( get_option( "{$size}_size_w" ) );
$image_sizes[ $size ]['height'] = intval( get_option( "{$size}_size_h" ) );
$image_sizes[ $size ]['crop'] = get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false;
Expand Down
7 changes: 5 additions & 2 deletions doofinder-for-woocommerce/readme.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
=== DOOFINDER Search and Discovery for WP & WooCommerce ===
Contributors: Doofinder
Tags: search, autocomplete
Version: 2.5.19
Version: 2.5.20
Requires at least: 5.6
Tested up to: 6.7.1
Requires PHP: 7.0
Stable tag: 2.5.19
Stable tag: 2.5.20
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -126,6 +126,9 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro

== Changelog ==

= 2.5.20 =
- Prevented an error when the $image_sizes array is not initialized.

= 2.5.19 =
- Prevented errors if the prices come as false instead of 0.
- Actually solved an issue regarding indices normalization on multilanguages.
Expand Down
4 changes: 2 additions & 2 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": "doofinder-woocommerce",
"version": "2.5.19",
"version": "2.5.20",
"description": "Integrate Doofinder in your WooCommerce site with (almost) no effort.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit e4d771c

Please sign in to comment.