Skip to content

Commit cf26e6d

Browse files
committed
Fix
1 parent 7825821 commit cf26e6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/SwitchTypeTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ function getGlobalConstType(
537537
return "hello";
538538
}
539539
540-
if (isset($predefined_constants[$fq_const_name])
540+
if ($fq_const_name !== null && (isset($predefined_constants[$fq_const_name])
541541
|| isset($predefined_constants[$const_name])
542-
) {
542+
)) {
543543
switch ($const_name) {
544544
case "PHP_MAJOR_VERSION":
545545
case "PHP_ZTS":
@@ -551,7 +551,7 @@ function getGlobalConstType(
551551
return "float";
552552
}
553553
554-
if ($fq_const_name !== null && isset($predefined_constants[$fq_const_name])) {
554+
if (isset($predefined_constants[$fq_const_name])) {
555555
return "mixed";
556556
}
557557

0 commit comments

Comments
 (0)