summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2018-07-04 03:04:31 +0200
committerKalle Sommer Nielsen <kalle@php.net>2018-07-04 03:04:31 +0200
commitc49f0fd9ac4253c959cb90cb8c470c2aadc3ae7b (patch)
tree37a26fea054dfef6e0acfd571c391e460cf588e9 /Zend
parent2edf94a637cf67a47c853ca84c6312cd3c3d3b73 (diff)
downloadphp-git-c49f0fd9ac4253c959cb90cb8c470c2aadc3ae7b.tar.gz
Fixed bug #76501 (Funny message with fatal error)
Diffstat (limited to 'Zend')
-rw-r--r--Zend/tests/break_error_001.phpt4
-rw-r--r--Zend/tests/break_error_002.phpt4
-rw-r--r--Zend/zend_compile.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/Zend/tests/break_error_001.phpt b/Zend/tests/break_error_001.phpt
index eb8ce2efef..d823f50563 100644
--- a/Zend/tests/break_error_001.phpt
+++ b/Zend/tests/break_error_001.phpt
@@ -1,5 +1,5 @@
--TEST--
-'break' error (non positive numbers)
+'break' error (non positive integers)
--FILE--
<?php
function foo () {
@@ -7,4 +7,4 @@ function foo () {
}
?>
--EXPECTF--
-Fatal error: 'break' operator accepts only positive numbers in %sbreak_error_001.php on line 3
+Fatal error: 'break' operator accepts only positive integers in %sbreak_error_001.php on line 3
diff --git a/Zend/tests/break_error_002.phpt b/Zend/tests/break_error_002.phpt
index a1c172d198..e78fd7594e 100644
--- a/Zend/tests/break_error_002.phpt
+++ b/Zend/tests/break_error_002.phpt
@@ -1,5 +1,5 @@
--TEST--
-'break' error (operator with non-constant operand)
+'break' error (operator with non-integer operand)
--FILE--
<?php
function foo () {
@@ -7,4 +7,4 @@ function foo () {
}
?>
--EXPECTF--
-Fatal error: 'break' operator with non-constant operand is no longer supported in %sbreak_error_002.php on line 3
+Fatal error: 'break' operator with non-integer operand is no longer supported in %sbreak_error_002.php on line 3
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index 8ee9caf73d..602d639f25 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -4560,13 +4560,13 @@ void zend_compile_break_continue(zend_ast *ast) /* {{{ */
if (depth_ast) {
zval *depth_zv;
if (depth_ast->kind != ZEND_AST_ZVAL) {
- zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator with non-constant operand "
+ zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator with non-integer operand "
"is no longer supported", ast->kind == ZEND_AST_BREAK ? "break" : "continue");
}
depth_zv = zend_ast_get_zval(depth_ast);
if (Z_TYPE_P(depth_zv) != IS_LONG || Z_LVAL_P(depth_zv) < 1) {
- zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator accepts only positive numbers",
+ zend_error_noreturn(E_COMPILE_ERROR, "'%s' operator accepts only positive integers",
ast->kind == ZEND_AST_BREAK ? "break" : "continue");
}