Skip to content

Commit 60cda40

Browse files
1.2.2: #4
1 parent 77ffe9b commit 60cda40

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Observer/ProductSaveBefore.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ function execute(O $o):void {
2121
# 2019-09-22 I have removed the `!df_product_type_composite($p)` condition.
2222
$p['color'] === $p->getOrigData('color')
2323
# 2019-08-21 A new image path can start with `#` because of a Magento 2 core bug.
24-
&& ($path = df_trim_text_right(df_path_n($p['image']), '.tmp')) !== df_path_n($p->getOrigData('image'))
24+
# 2023-08-01
25+
# «df_path_n(): Argument #1 ($p) must be of type string, null given,
26+
# called in vendor/mage2pro/color/Observer/ProductSaveBefore.php on line 24»:
27+
# https://github.com/mage2pro/color/issues/4
28+
&& ($path = df_trim_text_right(df_path_n($p['image']), '.tmp')) !== df_path_n(df_nts($p->getOrigData('image')))
2529
) {
2630
/** @var string $path */
2731
$full1 = df_product_image_path2abs($path); /** @var string $full1 */

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mage2pro/color"
3-
,"version": "1.2.1"
3+
,"version": "1.2.2"
44
,"description": "A product image color categorization module for Magento 2"
55
,"type": "magento2-module"
66
,"homepage": "https://mage2.pro/c/extensions/color"

0 commit comments

Comments
 (0)