I’m having a problem with a Magento Extension.
Error:
Deprecated Functionality: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Setup/ChangeMethodsFormat.php on line 40
Line 40 is: if (strpos($oldMethods, "n") === false) {
function is:
$oldMethods = $rule->getMethods();
if (strpos($oldMethods, "n") === false) {
continue;
}
can somebody help me?
PHP Version: 8.1.7
2
Answers
I solved this with using:
before:
This will switch off the Depracted warning. I know it's not te best way but it's working.
The error says that
$oldMethods
is null. So you could check for that:I assume that or is the correct operator.