Skip to content

Commit 2bd6c8e

Browse files
authored
Update Heading.php for Magento 2.4.6 (laminas)
Zend is depricated. Remove references to zend validate and replace with laminas versions.
1 parent bf54d94 commit 2bd6c8e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Model/Config/Heading.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* @licence: http://www.magepow.com/license-agreement
66
* @author: MichaelHa
77
* @create date: 2019-11-29 17:19:50
8-
* @LastEditors: MichaelHa
9-
* @LastEditTime: 2019-12-04 11:05:45
8+
* @LastEditors: ProxiBlue
9+
* @LastEditTime: 2024-01-23
1010
*/
1111

1212
namespace Magepow\Categories\Model\Config;
@@ -22,13 +22,11 @@ class Heading extends \Magento\Framework\App\Config\Value
2222
public function beforeSave()
2323
{
2424
$value = $this->getValue();
25-
$validator = \Zend_Validate::is(
26-
$value,
27-
'Regex',
25+
$validator = new \Laminas\Validator\Regex(
2826
['pattern' => '/^[\p{L}\p{N}_,;:!&#\+\*\$\?\|\'\.\-\ ]*$/iu']
2927
);
3028

31-
if (!$validator) {
29+
if (!$validator->isValid($value)) {
3230
$message = __(
3331
'Please correct categories heading: "%1".',
3432
$value

0 commit comments

Comments
 (0)