On Thu, 5 Apr 2001, Andi Gutmans wrote:
>At 10:22 AM 4/5/2001 +0200, Sascha Schumann wrote:
>> Am I the only one who thinks that breaking installations
>> which use a different arg_separator is odd? Now all those
>> working installations have to be manually modified just to
>> append ".output".
>
>Considering the ambiguity I think it is the right thing to do. The default
>behavior will be backwards compatible and we can have a big caps news entry
>about it (for people who changed arg_separator). We could also keep
>arg_separator as an INI parameter in 4.0.5 and raise an error with a
>message on how to fix it (changing arg_separator to arg_separator.output).
I did MFH for those changes into PHP_4_0_5 branch.
But I didn't want to commit this change into it yet before hearing
whether it's the proper way to handle the old arg_separator problem:
(also included as attachment..)
Index: main.c
===================================================================
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.356.2.2
diff -u -u -r1.356.2.2 main.c
--- main.c 2001/04/06 02:09:43 1.356.2.2
+++ main.c 2001/04/06 03:14:44
@@ -139,6 +139,18 @@
}
+static PHP_INI_MH(OnUpdateDeprecated)
+{
+ PLS_FETCH();
+
+ PG(arg_separator.output) = new_value;
+
+ if (stage==PHP_INI_STAGE_RUNTIME) {
+ php_error(E_WARNING, "The arg_separator directive is deprecated. Use
+arg_separator.output instead");
+ }
+ return SUCCESS;
+}
+
static PHP_INI_MH(OnUpdateTimeout)
{
ELS_FETCH();
@@ -211,6 +223,7 @@
STD_PHP_INI_ENTRY("arg_separator.output", "&", PHP_INI_ALL,
OnUpdateStringUnempty,arg_separator.output, php_core_globals,
core_globals)
STD_PHP_INI_ENTRY("arg_separator.input", "&",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, arg_separator.input,
php_core_globals, core_globals)
+ PHP_INI_ENTRY("arg_separator", "&", PHP_INI_ALL,
+ OnUpdateDeprecated)
STD_PHP_INI_ENTRY("auto_append_file", NULL, PHP_INI_ALL,
OnUpdateString, auto_append_file, php_core_globals,
core_globals)
STD_PHP_INI_ENTRY("auto_prepend_file", NULL, PHP_INI_ALL,
OnUpdateString, auto_prepend_file, php_core_globals,
core_globals)
Index: main.c
===================================================================
RCS file: /repository/php4/main/main.c,v
retrieving revision 1.356.2.2
diff -u -u -r1.356.2.2 main.c
--- main.c 2001/04/06 02:09:43 1.356.2.2
+++ main.c 2001/04/06 03:19:48
@@ -139,6 +139,18 @@
}
+static PHP_INI_MH(OnUpdateDeprecated)
+{
+ PLS_FETCH();
+
+ PG(arg_separator.output) = new_value;
+
+ if (stage==PHP_INI_STAGE_RUNTIME) {
+ php_error(E_WARNING, "The arg_separator directive is deprecated. Use
+arg_separator.output instead");
+ }
+ return SUCCESS;
+}
+
static PHP_INI_MH(OnUpdateTimeout)
{
ELS_FETCH();
@@ -211,6 +223,7 @@
STD_PHP_INI_ENTRY("arg_separator.output", "&", PHP_INI_ALL,
OnUpdateStringUnempty, arg_separator.output, php_core_globals,
core_globals)
STD_PHP_INI_ENTRY("arg_separator.input", "&",
PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateStringUnempty, arg_separator.input,
php_core_globals, core_globals)
+ PHP_INI_ENTRY("arg_separator", "&",
+PHP_INI_ALL, OnUpdateDeprecated)
STD_PHP_INI_ENTRY("auto_append_file", NULL, PHP_INI_ALL,
OnUpdateString, auto_append_file,
php_core_globals, core_globals)
STD_PHP_INI_ENTRY("auto_prepend_file", NULL, PHP_INI_ALL,
OnUpdateString, auto_prepend_file,
php_core_globals, core_globals)
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]