dmitry Thu Mar 16 11:32:00 2006 UTC
Modified files:
/php-src NEWS
/ZendEngine2 zend.c zend_compile.c zend_globals.h
/php-src/ext/standard/tests/array bug33940.phpt
/php-src/main main.c php_globals.h
Log:
Dropped allow_call_time_pass_reference, the error is maden E_STRICT.
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2102&r2=1.2103&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2102 php-src/NEWS:1.2103
--- php-src/NEWS:1.2102 Thu Mar 16 10:33:22 2006
+++ php-src/NEWS Thu Mar 16 11:32:00 2006
@@ -4,6 +4,7 @@
- Unicode support. (Andrei, Dmitry, et al)
- Dropped safe_mode support (Ilia, Andi)
- Dropped zend.ze1_compatibility_mode (Dmitry)
+- Dropped allow_call_time_pass_reference, the error is maden E_STRICT. (Dmitry)
- Dropped register_long_arrays (Dmitry)
- Droped register_globals support (Pierre)
- session_register, session_unregister and session_is_registered removed they
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend.c?r1=1.342&r2=1.343&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.342 ZendEngine2/zend.c:1.343
--- ZendEngine2/zend.c:1.342 Thu Mar 16 10:33:23 2006
+++ ZendEngine2/zend.c Thu Mar 16 11:32:00 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.c,v 1.342 2006/03/16 10:33:23 dmitry Exp $ */
+/* $Id: zend.c,v 1.343 2006/03/16 11:32:00 dmitry Exp $ */
#include "zend.h"
#include "zend_extensions.h"
@@ -673,7 +673,6 @@
/* default compile-time values */
CG(asp_tags) = 0;
CG(short_tags) = 1;
- CG(allow_call_time_pass_reference) = 1;
CG(extended_info) = 0;
}
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_compile.c?r1=1.695&r2=1.696&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.695 ZendEngine2/zend_compile.c:1.696
--- ZendEngine2/zend_compile.c:1.695 Wed Mar 15 09:04:48 2006
+++ ZendEngine2/zend_compile.c Thu Mar 16 11:32:00 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.695 2006/03/15 09:04:48 dmitry Exp $ */
+/* $Id: zend_compile.c,v 1.696 2006/03/16 11:32:00 dmitry Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -1642,19 +1642,22 @@
zend_stack_top(&CG(function_call_stack), (void **) &function_ptr_ptr);
function_ptr = *function_ptr_ptr;
- if (original_op==ZEND_SEND_REF
- && !CG(allow_call_time_pass_reference)) {
- zend_error(E_COMPILE_WARNING,
- "Call-time pass-by-reference has been
deprecated - argument passed by value; "
- "If you would like to pass it by
reference, modify the declaration of %R(). "
- "If you would like to enable call-time
pass-by-reference, you can set "
- "allow_call_time_pass_reference to true
in your INI file. "
- "However, future versions may not
support this any longer. ",
- (function_ptr &&
UG(unicode))?IS_UNICODE:IS_STRING,
-
(function_ptr?function_ptr->common.function_name.s:"[runtime function name]"));
- }
-
- if (function_ptr) {
+ if (original_op==ZEND_SEND_REF) {
+ if (function_ptr &&
+ function_ptr->common.function_name.v &&
+ function_ptr->common.type == ZEND_USER_FUNCTION &&
+ !ARG_SHOULD_BE_SENT_BY_REF(function_ptr, (zend_uint)
offset)) {
+ zend_error(E_STRICT,
+ "Call-time pass-by-reference has been
deprecated; "
+ "if you would like to pass argument by
reference, modify the declaration of %R().",
+ UG(unicode)?IS_UNICODE:IS_STRING,
+ function_ptr->common.function_name.v);
+ } else{
+ zend_error(E_STRICT,
+ "Call-time pass-by-reference has been
deprecated");
+ }
+ send_by_reference = 1;
+ } else if (function_ptr) {
if (ARG_MAY_BE_SENT_BY_REF(function_ptr, (zend_uint) offset)) {
op = (param->op_type &
(IS_VAR|IS_CV))?ZEND_SEND_REF:ZEND_SEND_VAL;
send_by_reference = 0;
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_globals.h?r1=1.150&r2=1.151&diff_format=u
Index: ZendEngine2/zend_globals.h
diff -u ZendEngine2/zend_globals.h:1.150 ZendEngine2/zend_globals.h:1.151
--- ZendEngine2/zend_globals.h:1.150 Thu Mar 16 10:33:23 2006
+++ ZendEngine2/zend_globals.h Thu Mar 16 11:32:00 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_globals.h,v 1.150 2006/03/16 10:33:23 dmitry Exp $ */
+/* $Id: zend_globals.h,v 1.151 2006/03/16 11:32:00 dmitry Exp $ */
#ifndef ZEND_GLOBALS_H
#define ZEND_GLOBALS_H
@@ -101,7 +101,6 @@
zend_bool in_compilation;
zend_bool short_tags;
zend_bool asp_tags;
- zend_bool allow_call_time_pass_reference;
zend_declarables declarables;
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/tests/array/bug33940.phpt?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/standard/tests/array/bug33940.phpt
diff -u php-src/ext/standard/tests/array/bug33940.phpt:1.3
php-src/ext/standard/tests/array/bug33940.phpt:1.4
--- php-src/ext/standard/tests/array/bug33940.phpt:1.3 Thu Aug 11 23:50:04 2005
+++ php-src/ext/standard/tests/array/bug33940.phpt Thu Mar 16 11:32:00 2006
@@ -24,7 +24,10 @@
echo 'Array: '; print_r($a);
echo 'Return: '; print_r($ret);
?>
---EXPECT--
+--EXPECTF--
+Strict Standards: Call-time pass-by-reference has been deprecated in
%sbug33940.php on line 7
+
+Strict Standards: Call-time pass-by-reference has been deprecated in
%sbug33940.php on line 17
Array: Array
(
[0] => Array
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.676&r2=1.677&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.676 php-src/main/main.c:1.677
--- php-src/main/main.c:1.676 Thu Mar 16 10:33:23 2006
+++ php-src/main/main.c Thu Mar 16 11:32:00 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.676 2006/03/16 10:33:23 dmitry Exp $ */
+/* $Id: main.c,v 1.677 2006/03/16 11:32:00 dmitry Exp $ */
/* {{{ includes
*/
@@ -349,7 +349,6 @@
PHP_INI_ENTRY_EX("highlight.keyword", HL_KEYWORD_COLOR,
PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
PHP_INI_ENTRY_EX("highlight.string", HL_STRING_COLOR,
PHP_INI_ALL, NULL, php_ini_color_displayer_cb)
- STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference", "1",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool,
allow_call_time_pass_reference, zend_compiler_globals, compiler_globals)
STD_PHP_INI_BOOLEAN("asp_tags", "0",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool,
asp_tags, zend_compiler_globals,
compiler_globals)
STD_PHP_INI_BOOLEAN("display_errors", "1",
PHP_INI_ALL, OnUpdateBool, display_errors,
php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("display_startup_errors", "0", PHP_INI_ALL,
OnUpdateBool, display_startup_errors,
php_core_globals, core_globals)
http://cvs.php.net/viewcvs.cgi/php-src/main/php_globals.h?r1=1.104&r2=1.105&diff_format=u
Index: php-src/main/php_globals.h
diff -u php-src/main/php_globals.h:1.104 php-src/main/php_globals.h:1.105
--- php-src/main/php_globals.h:1.104 Thu Mar 16 09:44:41 2006
+++ php-src/main/php_globals.h Thu Mar 16 11:32:00 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_globals.h,v 1.104 2006/03/16 09:44:41 dmitry Exp $ */
+/* $Id: php_globals.h,v 1.105 2006/03/16 11:32:00 dmitry Exp $ */
#ifndef PHP_GLOBALS_H
#define PHP_GLOBALS_H
@@ -50,7 +50,6 @@
} arg_separators;
struct _php_core_globals {
- zend_bool allow_call_time_pass_reference;
zend_bool implicit_flush;
long output_buffering;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php