Skip to content

Fix issues around use of class_exists and function_exists

Compare
Choose a tag to compare
@muglug muglug released this 28 Jun 15:33

Bugfixes

Fixes an issue (#1859) introduced in 3.4.3 where conditional definitions of functions e.g.

if (!function_exists("some_function")) {
  function some_function() {...}
}

would result in a crash some_function does exist in the runtime, and it's internal.

Also fixes a similar issue (#1860) where Psalm could crash while analysing blocks surrounded by a if (class_exists(Foo::class)) if Psalm thinks Foo always exists.