Skip to content

Commit 3a4bb04

Browse files
authored
Fixed null parameter warning on Mage_Core_Model_Input_Filter_MaliciousCode::filter() (#3822)
1 parent ad6b3c5 commit 3a4bb04

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@ class Mage_Core_Model_Input_Filter_MaliciousCode implements Zend_Filter_Interfac
5050
];
5151

5252
/**
53-
* Filter value
54-
*
55-
* @param string|array $value
53+
* @param string|array|null $value
5654
* @return string|array
5755
*/
5856
public function filter($value)
5957
{
58+
if ($value === null) {
59+
return '';
60+
}
61+
6062
do {
6163
$value = preg_replace($this->_expressions, '', $value, -1, $count);
6264
} while ($count !== 0);

0 commit comments

Comments
 (0)