Skip to content

Instantly share code, notes, and snippets.

@iancassidyweb
Created May 19, 2017 09:20
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iancassidyweb/52c9814f18b2a22da4b06c44959f71db to your computer and use it in GitHub Desktop.
Save iancassidyweb/52c9814f18b2a22da4b06c44959f71db to your computer and use it in GitHub Desktop.
Magento 2.1.6 - Image Resizer Patch - Allow CLI Override
Index: www/vendor/magento/module-catalog/Helper/Image.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- www/vendor/magento/module-catalog/Helper/Image.php
+++ www/vendor/magento/module-catalog/Helper/Image.php
@@ -494,6 +494,6 @@
protected function isScheduledActionsAllowed()
{
$model = $this->_getModel();
- if ($model->isBaseFilePlaceholder() || $model->isCached()) {
+ if ($model->isBaseFilePlaceholder() || ($model->isCached() && php_sapi_name() !== 'cli')) {
return false;
}
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment