Browse Source

- Implement ability to turn off support for call-time pass by reference

PHP-4.0.5
Zeev Suraski 26 years ago
parent
commit
d8000684bf
  1. 6
      main/main.c
  2. 2
      main/php_globals.h
  3. 12
      php.ini-dist

6
main/main.c

@ -187,6 +187,7 @@ static PHP_INI_MH(OnUpdateErrorReporting)
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("short_open_tag", "1", PHP_INI_ALL, OnUpdateBool, short_tags, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("asp_tags", "0", PHP_INI_ALL, OnUpdateBool, asp_tags, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("allow_call_time_pass_reference", "1", PHP_INI_ALL, OnUpdateBool, allow_call_time_pass_reference, php_core_globals, core_globals)
PHP_INI_ENTRY("precision", "14", PHP_INI_ALL, OnSetPrecision)
STD_PHP_INI_BOOLEAN("output_buffering", "0", PHP_INI_PERDIR|PHP_INI_SYSTEM, OnUpdateBool, output_buffering, php_core_globals, core_globals)
@ -985,8 +986,9 @@ int php_module_startup(sapi_module_struct *sf)
REGISTER_INI_ENTRIES();
zuv.short_tags = (unsigned char) PG(short_tags);
zuv.asp_tags = (unsigned char) PG(asp_tags);
zuv.short_tags = (zend_bool) PG(short_tags);
zuv.asp_tags = (zend_bool) PG(asp_tags);
zuv.allow_call_time_pass_reference = PG(allow_call_time_pass_reference);
zuv.import_use_extension = ".php";
zend_set_utility_values(&zuv);
php_startup_SAPI_content_types();

2
main/php_globals.h

@ -50,6 +50,8 @@ struct _php_core_globals {
zend_bool asp_tags;
zend_bool short_tags;
zend_bool allow_call_time_pass_reference;
zend_bool zend_set_utility_values;
zend_bool output_buffering;
zend_bool safe_mode;

12
php.ini-dist

@ -44,6 +44,18 @@ output_buffering = Off ; Output buffering allows you to send header lines (inclu
; You can enable output buffering by in runtime by calling the output
; buffering functions, or enable output buffering for all files
; by setting this directive to On.
allow_call_time_pass_reference = On ; whether to enable the ability to force arguments to be
; passed by reference at function-call time. This method
; is deprecated, and is likely to be unsupported in future
; versions of PHP/Zend. The encouraged method of specifying
; which arguments should be passed by reference is in the
; function declaration. You're encouraged to try and
; turn this option Off, and make sure your scripts work
; properly with it, to ensure they will work with future
; versions of the language (you will receive a warning
; each time you use this feature, and the argument will
; be passed by value instead of by reference).
; Safe Mode
safe_mode = Off
safe_mode_exec_dir =

Loading…
Cancel
Save