[Debug] fix ErrorHandlerTest when context is not an array
bug #10803 [Debug] fix ErrorHandlerTest when context is not an array (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[Debug] fix ErrorHandlerTest when context is not an array

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | none

Commits
-------

988a5dc [Debug] fix ErrorHandlerTest when context is not an array