$this->request variable type error using strpos |
After upgrading to version 4.3.0 VsCode gives me a type error
PHP Code: if (0 === strpos($this->request->getGet('todo'), 'modifica_')) VsCode (intelephense), gives me an error in $this->request->getGet('todo') - Expected type 'string' Found array|null I did a test by checking the type with PHP Code: echo gettype($this->request->getGet('todo')); It correctly returns me string The only way to make the error go away is to cast to string PHP Code: if (0 === strpos((string)$this->request->getGet('todo'), 'modifica_')) The application works in all three ways, but I would like to understand what it depends on |
Messages In This Thread |
$this->request variable type error using strpos - by serialkiller - 01-11-2023, 09:13 AM
|