Let's see if the recent PHP updates fixed anything.
Explicitly check if $injector exists (Bug #12103).

Since this code is called directly from PHP as an error handler, we have no
control when the code is called, and whether the injector has already been
created or has already been destructed.
[jan] Fix error handler in some PHP versions (Bug #12103).