diff options
author | Dmitry Stogov <dmitry@php.net> | 2009-01-20 13:21:52 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2009-01-20 13:21:52 +0000 |
commit | 666bf10d1a118e113a1aaf454a524886571292e8 (patch) | |
tree | 57811e6682bcfdda0f10ff665fa95b9affed5728 | |
parent | d1958eeea8b3c45043d4e61bf5f7dceba28d4c73 (diff) | |
download | php-git-666bf10d1a118e113a1aaf454a524886571292e8.tar.gz |
Removed wrong warning message
-rw-r--r-- | Zend/tests/bug47165.phpt | 4 | ||||
-rw-r--r-- | Zend/zend_compile.c | 2 | ||||
-rw-r--r-- | Zend/zend_compile.h | 1 | ||||
-rw-r--r-- | Zend/zend_vm_def.h | 4 | ||||
-rw-r--r-- | Zend/zend_vm_execute.h | 8 | ||||
-rw-r--r-- | ext/standard/tests/array/extract_variation9.phpt | 4 |
6 files changed, 13 insertions, 10 deletions
diff --git a/Zend/tests/bug47165.phpt b/Zend/tests/bug47165.phpt index 343c98c1ee..2cf648d855 100644 --- a/Zend/tests/bug47165.phpt +++ b/Zend/tests/bug47165.phpt @@ -14,7 +14,5 @@ class Foo { extract(Foo::bar()); echo "ok\n"; ?> ---EXPECTF-- - -Strict Standards: Only variables should be passed by reference in %sbug47165.php on line 11 +--EXPECT-- ok diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4c86b98e39..7f7014b41c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2133,7 +2133,7 @@ void zend_do_pass_param(znode *param, zend_uchar op, int offset TSRMLS_DC) if (op == ZEND_SEND_VAR && zend_is_function_or_method_call(param)) { /* Method call */ op = ZEND_SEND_VAR_NO_REF; - send_function = ZEND_ARG_SEND_FUNCTION; + send_function = ZEND_ARG_SEND_FUNCTION | ZEND_ARG_SEND_SILENT; } } else { op = ZEND_SEND_VAL; diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index c8e260f932..d9ac44b458 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -702,6 +702,7 @@ int zendlex(znode *zendlval TSRMLS_DC); #define ZEND_ARG_SEND_BY_REF (1<<0) #define ZEND_ARG_COMPILE_TIME_BOUND (1<<1) #define ZEND_ARG_SEND_FUNCTION (1<<2) +#define ZEND_ARG_SEND_SILENT (1<<3) #define ZEND_SEND_BY_VAL 0 #define ZEND_SEND_BY_REF 1 diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 5c35aad635..0a849f22cb 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -2645,7 +2645,9 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY) } else { zval *valptr; - zend_error(E_STRICT, "Only variables should be passed by reference"); + if (!(opline->extended_value & ZEND_ARG_SEND_SILENT)) { + zend_error(E_STRICT, "Only variables should be passed by reference"); + } ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, varptr); if (!IS_OP1_TMP_FREE()) { diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index 2e85088bd0..d36ee7b03b 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -8202,7 +8202,9 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HAND } else { zval *valptr; - zend_error(E_STRICT, "Only variables should be passed by reference"); + if (!(opline->extended_value & ZEND_ARG_SEND_SILENT)) { + zend_error(E_STRICT, "Only variables should be passed by reference"); + } ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, varptr); if (!0) { @@ -22261,7 +22263,9 @@ static int ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDL } else { zval *valptr; - zend_error(E_STRICT, "Only variables should be passed by reference"); + if (!(opline->extended_value & ZEND_ARG_SEND_SILENT)) { + zend_error(E_STRICT, "Only variables should be passed by reference"); + } ALLOC_ZVAL(valptr); INIT_PZVAL_COPY(valptr, varptr); if (!0) { diff --git a/ext/standard/tests/array/extract_variation9.phpt b/ext/standard/tests/array/extract_variation9.phpt index e0b3a75fb8..4d42a69762 100644 --- a/ext/standard/tests/array/extract_variation9.phpt +++ b/ext/standard/tests/array/extract_variation9.phpt @@ -14,9 +14,7 @@ var_dump ( extract(get_object_vars($A),EXTR_REFS)); echo "Done\n"; ?> ---EXPECTF-- +--EXPECT-- *** Testing for object *** - -Strict Standards: Only variables should be passed by reference in %sextract_variation9.php on line 10 int(1) Done |