Skip to content

Commit 924a96d

Browse files
netzstrategencreative-andrew
authored andcommitted
fix:woocommerce undefined array key
1 parent d1ea595 commit 924a96d

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From b6996798e37cc170c9b104f4f7220583e5e671cf Mon Sep 17 00:00:00 2001
2+
From: creative-andrew <[email protected]>
3+
Date: Tue, 2 Jul 2024 15:57:25 +0200
4+
Subject: [PATCH] fix: php warning undefined array key
5+
6+
---
7+
includes/class-wc-regenerate-images.php | 4 ++++
8+
1 file changed, 4 insertions(+)
9+
10+
diff --git a/includes/class-wc-regenerate-images.php b/includes/class-wc-regenerate-images.php
11+
index 1ffedca626..c72a2456a3 100644
12+
--- a/includes/class-wc-regenerate-images.php
13+
+++ b/includes/class-wc-regenerate-images.php
14+
@@ -272,6 +272,10 @@ class WC_Regenerate_Images {
15+
$imagedata['width'] = $imagedata['sizes']['full']['width'];
16+
}
17+
18+
+ if ( ! isset( $imagedata['height'], $imagedata['width'] ) ) {
19+
+ return array();
20+
+ }
21+
+
22+
return array(
23+
'width' => $imagedata['width'],
24+
'height' => $imagedata['height'],
25+
--
26+
2.24.4
27+

0 commit comments

Comments
 (0)