Skip to content

Commit

Permalink
Merge pull request #19 from cloudinary/v1.7.5
Browse files Browse the repository at this point in the history
v1.7.5
  • Loading branch information
Pniel (Pini) Cohen authored Feb 14, 2019
2 parents 0efe399 + e2eddc0 commit 4fe4f50
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Model/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public function getCdnSubdomainStatus()
*/
public function getUserPlatform()
{
return sprintf(self::USER_PLATFORM_TEMPLATE, '1.7.4', '2.0.0');
return sprintf(self::USER_PLATFORM_TEMPLATE, '1.7.5', '2.0.0');
}

/**
Expand Down
12 changes: 6 additions & 6 deletions Plugin/Catalog/Block/Product/ImageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,21 @@ public function __construct(
* @param array|null $attributes
* @return ImageBlock
*/
public function aroundCreate(CatalogImageFactory $catalogImageFactory, callable $proceed, Product $product, string $imageId, array $attributes = null)
public function aroundCreate(CatalogImageFactory $catalogImageFactory, callable $proceed, $product = null, $imageId = null, $attributes = null)
{
$imageBlock = $proceed($product, $imageId, $attributes);
$imageBlock = call_user_func_array($proceed, array_slice(func_get_args(), 2));

if (!$this->configuration->isEnabled()) {
return $imageBlock;
}

if (class_exists('\Magento\Catalog\Model\Product\Image\ParamsBuilder')) {
$this->imageParamsBuilder = $this->objectManager->get('\Magento\Catalog\Model\Product\Image\ParamsBuilder');
} else {
//Skip on Magento versions prior to 2.3
//Skip on Magento versions prior to 2.3
if (is_array($product) || !class_exists('\Magento\Catalog\Model\Product\Image\ParamsBuilder')) {
return $imageBlock;
}

$this->imageParamsBuilder = $this->objectManager->get('\Magento\Catalog\Model\Product\Image\ParamsBuilder');

try {
if (strpos($imageBlock->getImageUrl(), $this->configuration->getMediaBaseUrl() . 'catalog/product') === 0) {
$viewImageConfig = $this->presentationConfig->getViewConfig()->getMediaAttributes(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cloudinary/cloudinary-magento2",
"description": "Cloudinary Magento 2 Integration.",
"type": "magento2-module",
"version": "1.7.4",
"version": "1.7.5",
"license": "MIT",
"require": {
"cloudinary/cloudinary_php": "*"
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Cloudinary_Cloudinary" setup_version="1.7.4">
<module name="Cloudinary_Cloudinary" setup_version="1.7.5">
<sequence>
<module name="Magento_ProductVideo"/>
</sequence>
Expand Down
2 changes: 1 addition & 1 deletion marketplace.composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cloudinary/cloudinary",
"type": "magento2-module",
"version": "1.7.4",
"version": "1.7.5",
"description": "Cloudinary Magento 2 Integration.",
"license": "MIT",
"require": {
Expand Down

0 comments on commit 4fe4f50

Please sign in to comment.