foreach ($statusCollection as $statusModel)
{
if ($statusModel->getId() == substr($status, strpos($status, '_') + 1))
{
// this is it!
$this->_frameworkRegistry = $om->get('Magento\Framework\Registry');
}
}
1 Answer
This error means that your might have logical mistake in your code.
Function strpos returns int|false
.
See details about this warning in official documentation:
Warning: on may return Boolean false, but may also return a non-Boolean value which evaluates to false. Please read the section on Booleans for more information. Use the === operator for testing the return value of this function.
This means that you need to check result of strpos
like !== false
before using result.