File tree 2 files changed +8
-3
lines changed
src/Symfony/Component/ErrorHandler
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 17
17
$ status = 'warning ' ;
18
18
} else {
19
19
$ severity = 0 ;
20
- if (($ exception = $ log ['context ' ]['exception ' ] ?? null ) instanceof \ErrorException) {
20
+ if (($ exception = $ log ['context ' ]['exception ' ] ?? null ) instanceof \ErrorException || $ exception instanceof \ Symfony \ Component \ ErrorHandler \ Exception \SilencedErrorContext ) {
21
21
$ severity = $ exception ->getSeverity ();
22
22
}
23
23
$ status = \E_DEPRECATED === $ severity || \E_USER_DEPRECATED === $ severity ? 'warning ' : 'normal ' ;
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \ErrorHandler ;
13
13
14
+ use Symfony \Component \ErrorHandler \Exception \SilencedErrorContext ;
15
+
14
16
/**
15
17
* @internal
16
18
*/
17
19
class ThrowableUtils
18
20
{
19
- public static function getSeverity (\Throwable $ throwable ): int
21
+ /**
22
+ * @param SilencedErrorContext|\Throwable
23
+ */
24
+ public static function getSeverity ($ throwable ): int
20
25
{
21
- if ($ throwable instanceof \ErrorException) {
26
+ if ($ throwable instanceof \ErrorException || $ throwable instanceof SilencedErrorContext ) {
22
27
return $ throwable ->getSeverity ();
23
28
}
24
29
You can’t perform that action at this time.
0 commit comments