Trying to access array offset on value of type null
if ($previous['type'] === EmailLexer::S_BACKSLASH
The error states that the variable $previous, which you expect to be an array, is actually null. You can't use an array offset on a null. Given that you said it was developed 2 years ago, probably some library changed and has different return types. Check where you instantiate $previous or how it is assigned a value.