From 1ee7db23f4162d4ae6cb00f57d5c9444e3ea623e Mon Sep 17 00:00:00 2001 From: Prashant Patel Date: Fri, 26 May 2023 15:38:14 +0530 Subject: [PATCH] #91: Missing class Zend_Filter_Input saving a slider in M2.4.6 / PHP 8.1 --- Controller/Adminhtml/Slider/Save.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Controller/Adminhtml/Slider/Save.php b/Controller/Adminhtml/Slider/Save.php index f047e5f..5aecd11 100644 --- a/Controller/Adminhtml/Slider/Save.php +++ b/Controller/Adminhtml/Slider/Save.php @@ -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 @@ -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'])) {