Skip to content

Commit 2fa344f

Browse files
committed
MDVA-222: Port down MAGETWO-50611
1 parent dea6ba5 commit 2fa344f

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

app/code/Magento/Config/Model/Config/Backend/Cache.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@ class Cache extends \Magento\Framework\App\Config\Value
2222
/**
2323
* Clean cache, value was changed
2424
*
25-
* @return void
25+
* @return $this
2626
*/
2727
public function afterSave()
2828
{
2929
if ($this->isValueChanged()) {
3030
$this->_cacheManager->clean($this->_cacheTags);
3131
}
32+
33+
return $this;
3234
}
3335
}

app/code/Magento/Config/Model/Config/Backend/Datashare.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
class Datashare extends \Magento\Framework\App\Config\Value
1515
{
1616
/**
17-
* @return void
17+
* @return $this
1818
*/
1919
public function afterSave()
2020
{
21+
return $this;
2122
}
2223
}

app/code/Magento/Tax/Model/Config/Price/IncludePrice.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
class IncludePrice extends \Magento\Framework\App\Config\Value
99
{
1010
/**
11-
* @return void
11+
* @return $this
1212
*/
1313
public function afterSave()
1414
{
15-
parent::afterSave();
15+
$result = parent::afterSave();
1616
$this->_cacheManager->clean(['checkout_quote']);
17+
18+
return $result;
1719
}
1820
}

app/code/Magento/WebapiSecurity/Model/Plugin/CacheInvalidator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,20 @@ public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cach
2626
* Invalidate WebApi cache if needed.
2727
*
2828
* @param \Magento\Framework\App\Config\Value $subject
29+
* @param \Magento\Framework\App\Config\Value $result
2930
* @return \Magento\Framework\App\Config\Value
3031
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3132
*/
32-
public function afterAfterSave(\Magento\Framework\App\Config\Value $subject)
33-
{
33+
public function afterAfterSave(
34+
\Magento\Framework\App\Config\Value $subject,
35+
\Magento\Framework\App\Config\Value $result
36+
) {
3437
if ($subject->getPath() == \Magento\WebapiSecurity\Model\Plugin\AnonymousResourceSecurity::XML_ALLOW_INSECURE
3538
&& $subject->isValueChanged()
3639
) {
3740
$this->cacheTypeList->invalidate(\Magento\Framework\App\Cache\Type\Webapi::TYPE_IDENTIFIER);
3841
}
3942

40-
return $subject;
43+
return $result;
4144
}
4245
}

0 commit comments

Comments
 (0)