Skip to content

Commit 3a7c716

Browse files
committed
Remove unnecessary check in runtime_compile_time_binary_operands.phpt
Now that operator errors are detected more accurately, we no longer have any cases where we throw a compile-time error instead of a run-time exception, so we can drop this check now.
1 parent f1dd8b2 commit 3a7c716

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Zend/tests/runtime_compile_time_binary_operands.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ function prepareLine($op1, $op2, $cmp, $operator) {
113113
$result = makeParam($cmp());
114114
$line .= "if (" . ($result === "(NAN)" ? "!is_nan($compare)" : "$compare !== $result") . ") { $error }";
115115
} catch (Error $e) {
116-
if (get_class($e) == "Error") {
117-
return "// exempt $op1_p $operator $op2_p from checking, it generates a compile time error";
118-
}
119116
$msg = makeParam($e->getMessage());
120117
$line .= "try { $compare; $error } catch (Error \$e) { if (\$e->getMessage() !== $msg) { $error } }";
121118
}

0 commit comments

Comments
 (0)