File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ protected function initialize() {
4848 $ ext = new \ReflectionExtension ($ name );
4949 try {
5050 $ prettyVersion = $ ext ->getVersion ();
51- $ prettyVersion = $ this ->normalizeVersion ($ prettyVersion );
51+ /** @psalm-suppress TypeDoesNotContainNull
52+ * @psalm-suppress RedundantCondition
53+ * TODO Remove these annotations once psalm fixes the method signature ( https://github.com/vimeo/psalm/pull/8655 )
54+ */
55+ $ prettyVersion = $ this ->normalizeVersion ($ prettyVersion ?? '0 ' );
5256 } catch (\UnexpectedValueException $ e ) {
5357 $ prettyVersion = '0 ' ;
5458 $ prettyVersion = $ this ->normalizeVersion ($ prettyVersion );
@@ -109,6 +113,9 @@ protected function initialize() {
109113 continue 2 ;
110114 }
111115
116+ if ($ prettyVersion === null ) {
117+ continue ;
118+ }
112119 try {
113120 $ prettyVersion = $ this ->normalizeVersion ($ prettyVersion );
114121 } catch (\UnexpectedValueException $ e ) {
You can’t perform that action at this time.
0 commit comments