Closed
Description
The following class
#File: app/code/Magento/Widget/Model/Resource/Layout/Plugin.php
is configured as a plugin
#File: app/code/Magento/Widget/etc/di.xml
<plugin name="widget-layout-update-plugin"
type="Magento\Widget\Model\Resource\Layout\Plugin" sortOrder="10"/>
However, the plugin's aroundGetDbUpdateString
method
public function aroundGetDbUpdateString(
\Magento\Framework\View\Model\Layout\Merge $subject,
\Closure $proceed,
$handle
) {
return $this->update->fetchUpdatesByHandle($handle, $subject->getTheme(), $subject->getScope());
}
Does not have a called to $procede()
. This seems like a bug/error/oversight (although, without the context of why this change was made, it's hard to say, which is why this is an issue and not a pull request).
Not calling $procede()
here means that attempts to hook this method via another plugin will fail. Also, the presence of a Magento core team written around
method without a call to $procede()
may encourage bad practices in third party plugins. Finally, since there's no need for a call to $procede()
, this should probably be an afterGetDbUpdateString
method, and not an around
method,