Skip to content

Commit

Permalink
1.2.2: #4
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Aug 1, 2023
1 parent 77ffe9b commit 60cda40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Observer/ProductSaveBefore.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ function execute(O $o):void {
# 2019-09-22 I have removed the `!df_product_type_composite($p)` condition.
$p['color'] === $p->getOrigData('color')
# 2019-08-21 A new image path can start with `#` because of a Magento 2 core bug.
&& ($path = df_trim_text_right(df_path_n($p['image']), '.tmp')) !== df_path_n($p->getOrigData('image'))
# 2023-08-01
# «df_path_n(): Argument #1 ($p) must be of type string, null given,
# called in vendor/mage2pro/color/Observer/ProductSaveBefore.php on line 24»:
# https://github.com/mage2pro/color/issues/4
&& ($path = df_trim_text_right(df_path_n($p['image']), '.tmp')) !== df_path_n(df_nts($p->getOrigData('image')))
) {
/** @var string $path */
$full1 = df_product_image_path2abs($path); /** @var string $full1 */
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/color"
,"version": "1.2.1"
,"version": "1.2.2"
,"description": "A product image color categorization module for Magento 2"
,"type": "magento2-module"
,"homepage": "https://mage2.pro/c/extensions/color"
Expand Down

0 comments on commit 60cda40

Please sign in to comment.