Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#91: Missing class Zend_Filter_Input saving a slider in M2.4.6 / PHP 8.1 #92

Open
wants to merge 1 commit into
base: 2.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions Controller/Adminhtml/Slider/Save.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
use Mageplaza\BannerSlider\Controller\Adminhtml\Slider;
use Mageplaza\BannerSlider\Model\SliderFactory;
use RuntimeException;
use Zend_Filter_Input;

use Magento\Framework\Filter\FilterInput;
/**
* Class Save
* @package Mageplaza\BannerSlider\Controller\Adminhtml\Slider
Expand Down Expand Up @@ -188,7 +187,12 @@ public function execute()
*/
protected function _filterData($data)
{
$inputFilter = new Zend_Filter_Input(['from_date' => $this->_dateFilter,], [], $data);
$filterValues = ['from_date' => $this->_dateFilter];
$inputFilter = new FilterInput(
$filterValues,
[],
$data
);
$data = $inputFilter->getUnescaped();

if (isset($data['responsive_items'])) {
Expand Down