Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed wrong warning message

  • Loading branch information...
commit 666bf10d1a118e113a1aaf454a524886571292e8 1 parent d1958ee
Dmitry Stogov authored
View
4 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
View
2  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;
View
1  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
View
4 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()) {
View
8 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) {
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.