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
The error says that $oldMethods is null. So you could check for that:
if ($oldMethods !== null || strpos($oldMethods, "\n") === false){
continue;
}
I assume that or is the correct operator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With