com php-src: improve error message to distinguish between arg by reference and by reference assignment: Zend/tests/type_declarations/typ
ed_properties_010.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h
| From: | Bob Weinand | Date: | Sat, 19 Mar 2016 12:55:20 +0000 |
| Subject: | com php-src: improve error message to distinguish between arg by reference and by reference assignment: Zend/tests/type_declarations/typ ed_properties_010.phpt Zend/zend_vm_def.h Zend/zend_vm_execute.h |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95669@lists.php.net to get a copy of this message | ||
Commit: 5037a74e9d57e3f6b9ad43be39d0467e79f66dda
Author: Joe Watkins <krakjoe@php.net> Sat, 19 Mar 2016 12:55:20 +0000
Parents: e3e46f0ec080ef17db249b3dc57c72b728219d06
Branches: typed_ref_properties
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5037a74e9d57e3f6b9ad43be39d0467e79f66dda
Log:
improve error message to distinguish between arg by reference and by reference assignment
Changed paths:
M Zend/tests/type_declarations/typed_properties_010.phpt
M Zend/zend_vm_def.h
M Zend/zend_vm_execute.h
Diff:
diff --git a/Zend/tests/type_declarations/typed_properties_010.phpt
b/Zend/tests/type_declarations/typed_properties_010.phpt
index 3ef8ece..b13d782 100644
--- a/Zend/tests/type_declarations/typed_properties_010.phpt
+++ b/Zend/tests/type_declarations/typed_properties_010.phpt
@@ -14,7 +14,7 @@ $foo = new Foo();
$cb($foo->bar);
?>
--EXPECTF--
-Fatal error: Uncaught TypeError: Typed property Foo::$bar must not be referenced in %s:11
+Fatal error: Uncaught TypeError: Typed property Foo::$bar must not be passed by reference in %s:11
Stack trace:
#0 {main}
thrown in %s on line 11
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 9d27b63..2db5d20 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2142,7 +2142,7 @@ ZEND_VM_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|THIS|CV,
CONST
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 583ce73..dabf976 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -5754,7 +5754,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -9544,7 +9544,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -11387,7 +11387,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CONST_
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -13723,7 +13723,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CO
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -14978,7 +14978,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_CV
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -15534,7 +15534,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_TMP_TM
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -18415,7 +18415,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CO
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -22954,7 +22954,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_CV
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -25688,7 +25688,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_VAR_TM
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -28279,7 +28279,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -31769,7 +31769,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -34202,7 +34202,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_UNUSED
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -39219,7 +39219,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CON
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -45780,7 +45780,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_CV_
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}
@@ -49512,7 +49512,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL
ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_TMP
if (prop_info) {
zend_throw_exception_ex(
zend_ce_type_error, prop_info->type,
- "Typed property %s::$%s must not be referenced",
+ "Typed property %s::$%s must not be passed by reference",
ZSTR_VAL(prop_info->ce->name), Z_STRVAL_P(property));
HANDLE_EXCEPTION();
}