File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
app/code/Magento/WebapiSecurity/Model/Plugin Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,20 @@ public function __construct(\Magento\Framework\App\Cache\TypeListInterface $cach
26
26
* Invalidate WebApi cache if needed.
27
27
*
28
28
* @param \Magento\Framework\App\Config\Value $subject
29
- * @param \Magento\Framework\App\Config\Value $result
30
- * @return \Magento\Framework\App\Config\Value
29
+ * @param \Magento\Framework\App\Config\Value|null $result
30
+ * @return \Magento\Framework\App\Config\Value|null
31
31
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
32
32
*/
33
33
public function afterAfterSave (
34
34
\Magento \Framework \App \Config \Value $ subject ,
35
- \ Magento \ Framework \ App \ Config \ Value $ result
35
+ $ result
36
36
) {
37
- if ($ result ->getPath () == \Magento \WebapiSecurity \Model \Plugin \AnonymousResourceSecurity::XML_ALLOW_INSECURE
38
- && $ result ->isValueChanged ()
39
- ) {
40
- $ this ->cacheTypeList ->invalidate (\Magento \Framework \App \Cache \Type \Webapi::TYPE_IDENTIFIER );
37
+ if (!is_null ($ result )) {
38
+ if ($ result ->getPath () == \Magento \WebapiSecurity \Model \Plugin \AnonymousResourceSecurity::XML_ALLOW_INSECURE
39
+ && $ result ->isValueChanged ()
40
+ ) {
41
+ $ this ->cacheTypeList ->invalidate (\Magento \Framework \App \Cache \Type \Webapi::TYPE_IDENTIFIER );
42
+ }
41
43
}
42
44
43
45
return $ result ;
You can’t perform that action at this time.
0 commit comments