cloudinary / cloudinary_magento2

Cloudinary's Magento 2 extension. Upload product images to the cloud, manipulate them to match your graphic design and optimize images for better user experience
MIT License
15 stars 8 forks source link

syntax error in Model/Api/ProductGalleryManagement.php #71

Closed chelevich closed 4 years ago

chelevich commented 4 years ago

magento2.4 setup:di:compile triggers the following error:

Deprecated Functionality: Unparenthesized a ? b : c ? d : e is deprecated. Use either (a ? b : c) ? d : e or a ? b : (c ? d : e) in /var/www/html/vendor/cloudinary/cloudinary-magento2/Model/Api/ProductGalleryManagement.php on line 326

And the line looks really strange, like comma is missing: (isset($item["sku"])) ? $item["sku"] : null(isset($item["publicId"])) ? $item["publicId"] : null,

leptians commented 4 years ago

Hi @chelevich , thank you for reporting this. Regarding missing comma, there is a comma at the end of that line. Can you elaborate more and perhaps provide an example where you think the missing comma should be?

chelevich commented 4 years ago

@leptians Looks like comma is missing between (isset($item["sku"])) ? $item["sku"] : null and (isset($item["publicId"])) ? $item["publicId"] : null,

I suppose $this->processOrQueue needs 7 parameters see another method call in this class around lines 258-266

leptians commented 4 years ago

@chelevich , ah right! thanks for pointing this out. Let me add this to our list.

chelevich commented 4 years ago

resolved in 1.14.1