summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS119
-rwxr-xr-xUPGRADING92
-rw-r--r--UPGRADING.INTERNALS99
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend.h6
-rw-r--r--Zend/zend_API.c4
-rw-r--r--Zend/zend_API.h2
-rw-r--r--Zend/zend_alloc.c4
-rw-r--r--Zend/zend_alloc.h2
-rw-r--r--Zend/zend_ast.c10
-rw-r--r--Zend/zend_execute.h6
-rw-r--r--Zend/zend_execute_API.c4
-rw-r--r--Zend/zend_extensions.c12
-rw-r--r--Zend/zend_extensions.h8
-rw-r--r--Zend/zend_indent.c3
-rw-r--r--Zend/zend_indent.h2
-rw-r--r--Zend/zend_interfaces.c2
-rw-r--r--Zend/zend_modules.h2
-rw-r--r--Zend/zend_object_handlers.c13
-rw-r--r--Zend/zend_vm_def.h22
-rw-r--r--Zend/zend_vm_execute.h114
-rw-r--r--configure.in2
-rw-r--r--ext/date/lib/parse_date.re2
-rw-r--r--ext/date/lib/parse_iso_intervals.re2
-rw-r--r--ext/dba/dba_inifile.c5
-rw-r--r--ext/dba/libinifile/inifile.c41
-rw-r--r--ext/dba/libinifile/inifile.h2
-rw-r--r--ext/dba/tests/bug62490.phpt43
-rw-r--r--ext/dba/tests/dba_db4_003.phpt2
-rw-r--r--ext/dba/tests/dba_db4_007.phpt2
-rw-r--r--ext/dba/tests/dba_db4_010.phpt38
-rw-r--r--ext/dba/tests/dba_handler.inc2
-rw-r--r--ext/dba/tests/dba_inifile.phpt8
-rw-r--r--ext/dba/tests/dba_tcadb.phpt6
-rw-r--r--ext/dom/php_dom.c2
-rw-r--r--ext/gd/libgd/gdft.c10
-rw-r--r--ext/json/json.c4
-rw-r--r--ext/libxml/tests/libxml_disable_entity_loader.phpt41
-rw-r--r--ext/libxml/tests/libxml_disable_entity_loader_payload.txt1
-rw-r--r--ext/mysqlnd/mysqlnd_net.c8
-rw-r--r--ext/mysqlnd/mysqlnd_ps.c1
-rw-r--r--ext/opcache/Optimizer/block_pass.c14
-rw-r--r--ext/opcache/Optimizer/pass2.c13
-rw-r--r--ext/opcache/ZendAccelerator.c4
-rw-r--r--ext/opcache/ZendAccelerator.h1
-rw-r--r--ext/opcache/zend_accelerator_module.c7
-rw-r--r--ext/opcache/zend_accelerator_module.h5
-rw-r--r--ext/openssl/xp_ssl.c2
-rw-r--r--ext/pcntl/pcntl.c2
-rw-r--r--ext/soap/php_encoding.c2
-rw-r--r--ext/spl/spl_array.c6
-rw-r--r--ext/spl/spl_directory.c4
-rw-r--r--ext/spl/spl_fixedarray.c4
-rw-r--r--ext/spl/spl_iterators.c8
-rw-r--r--ext/standard/array.c4
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/ftp_fopen_wrapper.c6
-rw-r--r--ext/standard/http_fopen_wrapper.c4
-rw-r--r--ext/standard/type.c2
-rw-r--r--ext/xsl/php_xsl.c25
-rw-r--r--main/SAPI.c2
-rw-r--r--main/SAPI.h2
-rw-r--r--main/main.c59
-rw-r--r--main/php.h2
-rw-r--r--main/php_content_types.c30
-rw-r--r--main/php_globals.h1
-rw-r--r--main/php_ini.c4
-rw-r--r--main/php_ticks.c12
-rw-r--r--main/php_ticks.h6
-rw-r--r--main/php_variables.c1
-rw-r--r--main/php_version.h6
-rw-r--r--main/streams/php_stream_context.h2
-rw-r--r--main/streams/streams.c3
-rw-r--r--main/streams/transports.c2
-rw-r--r--main/streams/userspace.c4
-rw-r--r--php.ini-development7
-rw-r--r--php.ini-production7
-rw-r--r--sapi/apache/mod_php5.c2
-rw-r--r--sapi/apache2filter/sapi_apache2.c3
-rw-r--r--sapi/apache2handler/sapi_apache2.c3
-rw-r--r--sapi/apache_hooks/mod_php5.c2
-rw-r--r--sapi/apache_hooks/php_apache.c12
-rw-r--r--sapi/caudium/caudium.c5
-rw-r--r--sapi/cgi/cgi_main.c10
-rw-r--r--sapi/cli/php_cli.c6
-rw-r--r--sapi/cli/php_cli_server.c8
-rw-r--r--sapi/continuity/capi.c2
-rw-r--r--sapi/embed/php_embed.c2
-rw-r--r--sapi/fpm/fpm/fpm_main.c2
-rw-r--r--sapi/litespeed/lsapi_main.c6
-rw-r--r--sapi/litespeed/lsapilib.c44
-rw-r--r--sapi/milter/php_milter.c8
-rw-r--r--sapi/nsapi/nsapi.c3
-rw-r--r--sapi/pi3web/pi3web_sapi.c2
-rw-r--r--sapi/roxen/roxen.c5
-rw-r--r--sapi/thttpd/thttpd.c3
-rw-r--r--sapi/tux/php_tux.c10
-rw-r--r--tests/basic/024.phpt31
-rw-r--r--tests/basic/024_1.phpt29
-rw-r--r--tests/basic/026.phpt18
-rw-r--r--tests/basic/026_1.phpt16
101 files changed, 447 insertions, 800 deletions
diff --git a/NEWS b/NEWS
index 3b41c6a055..904168c747 100644
--- a/NEWS
+++ b/NEWS
@@ -1,120 +1,11 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 2014, PHP 5.6.0 Alpha 2
+?? ??? 20??, PHP 5.7.0
-23 Jan 2014, PHP 5.6.0 Alpha 1
-- CLI server:
- . Added some MIME types to the CLI web server. (Chris Jones)
+- DBA:
+ . Fixed bug #62490 (dba_delete returns true on missing item (inifile)). (Mike)
-- Core:
- . Improved IS_VAR operands fetching. (Laruence, Dmitry)
- . Improved empty string handling. Now ZE uses an interned string instead of
- allocation new empty string each time. (Laruence, Dmitry)
- . Implemented internal operator overloading
- (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
- . Made calls from incompatible context issue an E_DEPRECATED warning instead
- of E_STRICT (phase 1 of RFC: https://wiki.php.net/rfc/incompat_ctx).
- (Gustavo)
- . Uploads equal or greater than 2GB in size are now accepted.
- (Ralf Lang, Mike)
- . Reduced POST data memory usage by 200-300%. Changed INI setting
- always_populate_raw_post_data to throw a deprecation warning when enabling
- and to accept -1 for never populating the $HTTP_RAW_POST_DATA global
- variable, which will be the default in future PHP versions. (Mike)
- . Implemented dedicated syntax for variadic functions
- (RFC: https://wiki.php.net/rfc/variadics). (Nikita)
- . Fixed bug #50333 Improving multi-threaded scalability by using
- emalloc/efree/estrdup (Anatol, Dmitry)
- . Implemented constant scalar expressions (with support for constants)
- (RFC: https://wiki.php.net/rfc/const_scalar_exprs). (Bob)
- . Fixed bug #65784 (Segfault with finally). (Laruence, Dmitry)
- . Fixed bug #66509 (copy() arginfo has changed starting from 5.4). (willfitch)
-
-- cURL:
- . Implemented FR #65646 (re-enable CURLOPT_FOLLOWLOCATION with open_basedir
- or safe_mode). (Adam)
-
-- GMP:
- . Moved GMP to use object as the underlying structure and implemented various
- improvements based on this.
- (RFC: https://wiki.php.net/rfc/operator_overloading_gmp). (Nikita)
- . Added gmp_root() and gmp_rootrem() functions for calculating nth roots.
- (Nikita)
-
-- Hash:
- . Added gost-crypto (CryptoPro S-box) GOST hash algo. (Manuel Mausz)
-
-- JSON:
- . Fixed case part of bug #64874 ("json_decode handles whitespace and
- case-sensitivity incorrectly")
-
-- mysqlnd:
- . Disabled flag for SP OUT variables for 5.5+ servers as they are not natively
- supported by the overlying APIs. (Andrey)
-
-- OPcache:
- . Added an optimization of class constants and constant calls to some
- internal functions (Laruence, Dmitry)
- . Added an optimization pass to convert FCALL_BY_NAME into DO_FCALL.
- (Laruence, Dmitry)
- . Added an optimization pass to merged identical constants (and related
- cache_slots) in op_array->literals table. (Laruence, Dmitry)
- . Added script level constant replacement optimization pass. (Dmitry)
-
-- Openssl:
- . Added crypto_method option for the ssl stream context. (Martin Jansen)
- . Added certificate fingerprint support. (Tjerk Meesters)
- . Added explicit TLSv1.1 and TLSv1.2 stream transports. (Daniel Lowrey)
- . Fixed bug #65729 (CN_match gives false positive). (Tjerk Meesters)
- . Peer name verification matches SAN DNS names for certs using
- the Subject Alternative Name x509 extension. (Daniel Lowrey)
- . Fixed segfault when built against OpenSSL>=1.0.1 (Daniel Lowrey)
-
-- PDO_pgsql:
- . Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support). (Matteo)
- . Fixed Bug #63657 (pgsqlCopyFromFile, pgsqlCopyToArray use Postgres < 7.3
- syntax). (Matteo)
-
-- phpdbg:
- . Included phpdbg sapi (RFC: https://wiki.php.net/rfc/phpdbg).
- (Felipe Pena, Joe Watkins and Bob Weinand)
-
-- pgsql:
- . pg_version() returns full report which obtained by PQparameterStatus().
- (Yasuo)
- . Added pg_lo_truncate(). (Yasuo)
- . Added 64bit large object support for PostgreSQL 9.3 and later. (Yasuo)
-
-- Session:
- . Fixed Bug #65315 (session.hash_function silently fallback to default md5)
- (Yasuo)
- . Implemented Request #54649 (Create session_serializer_name()). (Yasuo)
- . Implemented Request #17860 (Session write short circuit). (Yasuo)
- . Implemented Request #20421 (session_abort() and session_reset() function).
- (Yasuo)
- . Implemented Request #11100 (session_gc() function). (Yasuo)
-
-- Standard:
- . Implemented FR #65634 (HTTP wrapper is very slow with protocol_version
- 1.1). (Adam)
- . Implemented Change crypt() behavior w/o salt RFC. (Yasuo)
- https://wiki.php.net/rfc/crypt_function_salt
- . Implemented request #49824 (Change array_fill() to allow creating empty
- array). (Nikita)
-
-- XMLReader:
- . Fixed bug #55285 (XMLReader::getAttribute/No/Ns methods inconsistency).
- (Mike)
-
-- Zip:
- . update libzip to version 1.11.2.
- PHP don't use any ilibzip private symbol anymore. (Pierre, Remi)
- . new method ZipArchive::setPassword($password). (Pierre)
- . add --with-libzip option to build with system libzip. (Remi)
- . new methods:
- ZipArchive::setExternalAttributesName($name, $opsys, $attr [, $flags])
- ZipArchive::setExternalAttributesIndex($idx, $opsys, $attr [, $flags])
- ZipArchive::getExternalAttributesName($name, &$opsys, &$attr [, $flags])
- ZipArchive::getExternalAttributesIndex($idx, &$opsys, &$attr [, $flags])
+- XSL:
+ . Fixed bug #64776 (The XSLT extension is not thread safe). (Mike)
<<< NOTE: Insert NEWS from last stable release here prior to actual release! >>>
diff --git a/UPGRADING b/UPGRADING
index e59a632918..f5e36fefc8 100755
--- a/UPGRADING
+++ b/UPGRADING
@@ -20,88 +20,34 @@ PHP X.Y UPGRADE NOTES
1. Backward Incompatible Changes
========================================
-- JSON:
- json_decode() no longer accepts non-lowercase variants of lone JSON true,
- false or null values. For example, True or FALSE will now cause json_decode to
- return NULL and set an error value you can fetch with json_last_error().
- This affects JSON texts consisting solely of true, false or null. Text
- containing non-lowercase values inside JSON arrays or objects has never been
- accepted.
+- DBA
+ . dba_delete() now returns false if the key was not found for the inifile
+ handler, too.
========================================
2. New Features
========================================
-- Added constant scalar expressions syntax
- (https://wiki.php.net/rfc/const_scalar_exprs)
-
-- Added dedicated syntax for variadic functions.
- (https://wiki.php.net/rfc/variadics)
-
-- Added support for argument unpacking to complement the variadic syntax.
- (https://wiki.php.net/rfc/argument_unpacking)
-
-- The php://input stream is now re-usable and can be used concurrently with
- enable_post_data_reading=0.
-
-- Added gost-crypto (CryptoPro S-box) hash algo.
-
-- Added openssl certificate fingerprint support (inclusive stream context
- option).
-
-- Added openssl crypto method stream context option.
-
-- Added openssl peer verification support for SAN x509 extension
-
-- Added use function and use const.
- (https://wiki.php.net/rfc/use_function)
========================================
2. Changes in SAPI modules
========================================
-- Added phpdbg sapi.
- (https://wiki.php.net/rfc/phpdbg)
========================================
3. Deprecated Functionality
========================================
-- Incompatible context calls:
- Instance calls from an incompatible context are now deprecated and issue
- E_DEPRECATED instead of E_STRICT. See https://wiki.php.net/rfc/incompat_ctx
========================================
4. Changed Functions
========================================
-- cURL:
- CURLOPT_SAFE_UPLOAD is now turned on by default and uploads with @file
- do not work unless it is explicitly set to false.
-
-- Crypt:
- crypt() will now raise an E_NOTICE error if the salt parameter is omitted.
- See: https://wiki.php.net/rfc/crypt_function_salt
-
-- XMLReader:
- XMLReader::getAttributeNs and XMLReader::getAttributeNo now return NULL if
- the attribute could not be found, just like XMLReader::getAttribute.
========================================
5. New Functions
========================================
-- GMP:
- Added gmp_root($a, $nth) and gmp_rootrem($a, $nth) for calculating nth roots.
-
-- Openssl:
- Added string openssl_x509_fingerprint($x509, $type, $binary).
-
-- LDAP:
- Added ldap_escape($value, $ignore = "", $flags = 0).
-
-- Zip:
- Added ZipArchive::setPassword($password)
========================================
6. New Classes and Interfaces
@@ -117,50 +63,18 @@ PHP X.Y UPGRADE NOTES
8. Other Changes to Extensions
========================================
-- GMP:
- The GMP extension now uses objects as the underlying data structure, rather
- than resources. GMP instances now support dumping, serialization, cloning,
- casts to primitive types and have overloaded operators.
- (RFC: https://wiki.php.net/rfc/operator_overloading_gmp)
-
-- OCI8:
- - Added Implicit Result Set support for Oracle Database 12c with a
- new oci_get_implicit_resultset() function.
- - Using 'oci_execute($s, OCI_NO_AUTO_COMMIT)' for a SELECT no longer
- unnecessarily initiates an internal ROLLBACK during connection
- close.
- - Added DTrace probes enabled with PHP's generic --enable-dtrace
- - The oci_internal_debug() function is now a no-op.
- - The phpinfo() output format for OCI8 has changed.
========================================
9. New Global Constants
========================================
-- LDAP:
- LDAP_ESCAPE_FILTER int(1)
- LDAP_ESCAPE_DN int(2)
========================================
10. Changes to INI File Handling
========================================
-- Core:
- Changed always_populate_raw_post_data to throw a deprecation warning when
- enabled and to recognize ohe value -1 for never populating the global
- $HTTP_RAW_POST_DATA variable, which will be default in future PHP versions.
========================================
11. Other Changes
========================================
-- File upload:
- Uploads equal or greater than 2GB in size are now accepted.
-
-- HTTP stream wrapper:
- HTTP 1.1 requests now include a Connection: close header unless explicitly
- overridden by setting a Connection header via the header context option.
-
-- Zip:
- New --with-libzip option allow to use system libzip. Version > 0.11 required,
- Version >= 0.11.2 recommended for all features.
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index d1aca29dc4..97b281a93e 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -17,108 +17,11 @@ UPGRADE NOTES - PHP X.Y
1. Internal API changes
========================
- a. Addition of do_operation and compare object handlers
-
- Two new object handlers have been added:
-
- do_operation:
- typedef int (*zend_object_do_operation_t)(
- zend_uchar opcode, zval *result, zval *op1, zval *op2 TSRMLS_DC
- );
-
- compare:
- typedef int (*zend_object_compare_zvals_t)(
- zval *result, zval *op1, zval *op2 TSRMLS_DC
- );
+ a. zend_set_memory_limit() now takes the TSRMLS_CC macro as its last argument
- The first handler is used to overload arithmetic operations. The first
- argument specifies the opcode of the operator, result is the target zval,
- op1 the first operand and op2 the second operand. For unary operations
- op2 is NULL. If the handler returns FAILURE PHP falls back to the default
- behavior for the operation.
-
- The second handler is used to perform comparison operations with
- non-objects. The value written into result must be an IS_LONG with value
- -1 (smaller), 0 (equal) or 1 (greater). The return value is a SUCCESS/FAILURE
- return code. The difference between this handler and compare_objects is
- that it will be triggered for comparisons with non-objects and objects of
- different types. It takes precedence over compare_objects.
-
- Further docs in the RFC: https://wiki.php.net/rfc/operator_overloading_gmp
-
- b. return_value_ptr now always available, RETVAL_ZVAL_FAST macros
-
- The return_value_ptr argument to internal functions is now always set.
- Previously it was only available for functions returning by-reference.
- return_value_ptr can now be used to return zvals without copying them.
- For this purpose two new macros are provided:
-
- RETVAL_ZVAL_FAST(zv); /* analog to RETVAL_ZVAL(zv, 1, 0) */
- RETURN_ZVAL_FAST(zv); /* analog to RETURN_ZVAL(zv, 1, 0) */
-
- The macros behave similarly to the non-FAST variants with copy=1 and
- dtor=0, but will try to return the zval without making a copy by utilizing
- return_value_ptr.
-
- c. POST data handling
-
- The sapi_request_info's members post_data, post_data_len and raw_post_data as
- well as raw_post_data_len have been replaced with a temp PHP stream
- request_body.
-
- The recommended way to access raw POST data is to open and use a php://input
- stream wrapper. It is safe to be used concurrently and more than once.
-
- d. Arginfo changes
-
- The pass_rest_by_reference argument of the ZEND_BEGIN_ARG_INFO and
- ZEND_BEGIN_ARG_INFO_EX() is no longer used. The value passed to it is ignored.
-
- Instead a variadic argument is created using ZEND_ARG_VARIADIC_INFO():
-
- ZEND_ARG_VARIADIC_INFO(0, name) /* pass rest by value */
- ZEND_ARG_VARIADIC_INFO(1, name) /* pass rest by reference */
- ZEND_ARG_VARIADIC_INFO(ZEND_SEND_PREFER_REF, name)
- /* pass rest by prefer-ref */
-
- ZEND_ARG_VARIADIC_INFO() should only be used for the last argument.
-
- The following changes were applied to the zend_arg_info struct:
-
- typedef struct _zend_arg_info {
- const char *class_name;
- zend_uint class_name_len;
- zend_uchar type_hint;
- + zend_uchar pass_by_reference;
- zend_bool allow_null;
- - zend_bool pass_by_reference;
- + zend_bool is_variadic;
- } zend_arg_info;
-
- The following changes were applied to the zend_internal_function_info struct:
-
- typedef struct _zend_internal_function_info {
- zend_uint required_num_args;
- zend_uchar _type_hint;
- zend_bool return_reference;
- - zend_bool pass_rest_by_reference;
- + zend_bool _allow_null;
- + zend_bool _is_variadic;
- } zend_internal_function_info;
-
- The CHECK_ARG_SEND_TYPE(), ARG_MUST_BE_SENT_BY_REF(),
- ARG_SHOULD_BE_SENT_BY_REF() and ARG_MAY_BE_SENT_BY_REF() macros now assume
- that the argument passed to them is a zend_function* and that it is non-NULL.
========================
2. Build system changes
========================
- a. Unix build system changes
- - The bison version check is now a blacklist instead of a whitelist.
- - The bison binary can be specified through the YACC environment/configure
- variable. Previously `bison` was assumed to be in $PATH.
-
- b. Windows build system changes
- -
diff --git a/Zend/zend.c b/Zend/zend.c
index ce11631300..acbbcbebc7 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -52,7 +52,7 @@ ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC)
ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
ZEND_API void (*zend_block_interruptions)(void);
ZEND_API void (*zend_unblock_interruptions)(void);
-ZEND_API void (*zend_ticks_function)(int ticks);
+ZEND_API void (*zend_ticks_function)(int ticks TSRMLS_DC);
ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args);
int (*zend_vspprintf)(char **pbuf, size_t max_len, const char *format, va_list ap);
ZEND_API char *(*zend_getenv)(char *name, size_t name_len TSRMLS_DC);
diff --git a/Zend/zend.h b/Zend/zend.h
index ac2b28a1ef..c8b57cd043 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -22,7 +22,7 @@
#ifndef ZEND_H
#define ZEND_H
-#define ZEND_VERSION "2.6.0-dev"
+#define ZEND_VERSION "2.7.0-dev"
#define ZEND_ENGINE_2
@@ -550,7 +550,7 @@ typedef struct _zend_utility_functions {
void (*block_interruptions)(void);
void (*unblock_interruptions)(void);
int (*get_configuration_directive)(const char *name, uint name_length, zval *contents);
- void (*ticks_function)(int ticks);
+ void (*ticks_function)(int ticks TSRMLS_DC);
void (*on_timeout)(int seconds TSRMLS_DC);
int (*stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
int (*vspprintf_function)(char **pbuf, size_t max_len, const char *format, va_list ap);
@@ -702,7 +702,7 @@ extern ZEND_API zend_write_func_t zend_write;
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path TSRMLS_DC);
extern ZEND_API void (*zend_block_interruptions)(void);
extern ZEND_API void (*zend_unblock_interruptions)(void);
-extern ZEND_API void (*zend_ticks_function)(int ticks);
+extern ZEND_API void (*zend_ticks_function)(int ticks TSRMLS_DC);
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args) ZEND_ATTRIBUTE_PTR_FORMAT(printf, 4, 0);
extern ZEND_API void (*zend_on_timeout)(int seconds TSRMLS_DC);
extern ZEND_API int (*zend_stream_open_function)(const char *filename, zend_file_handle *handle TSRMLS_DC);
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index c17af98136..553060e0a0 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2313,10 +2313,8 @@ ZEND_API void zend_unregister_functions(const zend_function_entry *functions, in
}
/* }}} */
-ZEND_API int zend_startup_module(zend_module_entry *module) /* {{{ */
+ZEND_API int zend_startup_module(zend_module_entry *module TSRMLS_DC) /* {{{ */
{
- TSRMLS_FETCH();
-
if ((module = zend_register_internal_module(module TSRMLS_CC)) != NULL && zend_startup_module_ex(module TSRMLS_CC) == SUCCESS) {
return SUCCESS;
}
diff --git a/Zend/zend_API.h b/Zend/zend_API.h
index 0a7695b1c8..569407b19a 100644
--- a/Zend/zend_API.h
+++ b/Zend/zend_API.h
@@ -266,7 +266,7 @@ ZEND_API int zend_parse_parameter(int flags, int arg_num TSRMLS_DC, zval **arg,
ZEND_API int zend_register_functions(zend_class_entry *scope, const zend_function_entry *functions, HashTable *function_table, int type TSRMLS_DC);
ZEND_API void zend_unregister_functions(const zend_function_entry *functions, int count, HashTable *function_table TSRMLS_DC);
-ZEND_API int zend_startup_module(zend_module_entry *module_entry);
+ZEND_API int zend_startup_module(zend_module_entry *module_entry TSRMLS_DC);
ZEND_API zend_module_entry* zend_register_internal_module(zend_module_entry *module_entry TSRMLS_DC);
ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module TSRMLS_DC);
ZEND_API int zend_startup_module_ex(zend_module_entry *module TSRMLS_DC);
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index bdcee5cbe4..f621487819 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -2682,10 +2682,8 @@ ZEND_API char *zend_strndup(const char *s, uint length)
}
-ZEND_API int zend_set_memory_limit(size_t memory_limit)
+ZEND_API int zend_set_memory_limit(size_t memory_limit TSRMLS_DC)
{
- TSRMLS_FETCH();
-
AG(mm_heap)->limit = (memory_limit >= AG(mm_heap)->block_size) ? memory_limit : AG(mm_heap)->block_size;
return SUCCESS;
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index 05494ee37c..1541dffcec 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -139,7 +139,7 @@ inline static void * __zend_realloc(void *p, size_t len)
#define safe_estrdup(ptr) ((ptr)?(estrdup(ptr)):STR_EMPTY_ALLOC())
#define safe_estrndup(ptr, len) ((ptr)?(estrndup((ptr), (len))):STR_EMPTY_ALLOC())
-ZEND_API int zend_set_memory_limit(size_t memory_limit);
+ZEND_API int zend_set_memory_limit(size_t memory_limit TSRMLS_DC);
ZEND_API void start_memory_manager(TSRMLS_D);
ZEND_API void shutdown_memory_manager(int silent, int full_shutdown TSRMLS_DC);
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index cf595b4d58..49fd3ff0f0 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -231,9 +231,9 @@ ZEND_API void zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *s
break;
case ZEND_BOOL_AND:
zend_ast_evaluate(&op1, (&ast->u.child)[0], scope TSRMLS_CC);
- if (zend_is_true(&op1)) {
+ if (zend_is_true(&op1 TSRMLS_CC)) {
zend_ast_evaluate(&op2, (&ast->u.child)[1], scope TSRMLS_CC);
- ZVAL_BOOL(result, zend_is_true(&op2));
+ ZVAL_BOOL(result, zend_is_true(&op2 TSRMLS_CC));
zval_dtor(&op2);
} else {
ZVAL_BOOL(result, 0);
@@ -242,18 +242,18 @@ ZEND_API void zend_ast_evaluate(zval *result, zend_ast *ast, zend_class_entry *s
break;
case ZEND_BOOL_OR:
zend_ast_evaluate(&op1, (&ast->u.child)[0], scope TSRMLS_CC);
- if (zend_is_true(&op1)) {
+ if (zend_is_true(&op1 TSRMLS_CC)) {
ZVAL_BOOL(result, 1);
} else {
zend_ast_evaluate(&op2, (&ast->u.child)[1], scope TSRMLS_CC);
- ZVAL_BOOL(result, zend_is_true(&op2));
+ ZVAL_BOOL(result, zend_is_true(&op2 TSRMLS_CC));
zval_dtor(&op2);
}
zval_dtor(&op1);
break;
case ZEND_SELECT:
zend_ast_evaluate(&op1, (&ast->u.child)[0], scope TSRMLS_CC);
- if (zend_is_true(&op1)) {
+ if (zend_is_true(&op1 TSRMLS_CC)) {
if (!(&ast->u.child)[1]) {
*result = op1;
} else {
diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h
index 0d3a908a15..e79b945cc7 100644
--- a/Zend/zend_execute.h
+++ b/Zend/zend_execute.h
@@ -60,7 +60,7 @@ ZEND_API zend_execute_data *zend_create_execute_data_from_op_array(zend_op_array
ZEND_API void zend_execute(zend_op_array *op_array TSRMLS_DC);
ZEND_API void execute_ex(zend_execute_data *execute_data TSRMLS_DC);
ZEND_API void execute_internal(zend_execute_data *execute_data_ptr, struct _zend_fcall_info *fci, int return_value_used TSRMLS_DC);
-ZEND_API int zend_is_true(zval *op);
+ZEND_API int zend_is_true(zval *op TSRMLS_DC);
ZEND_API int zend_lookup_class(const char *name, int name_length, zend_class_entry ***ce TSRMLS_DC);
ZEND_API int zend_lookup_class_ex(const char *name, int name_length, const zend_literal *key, int use_autoload, zend_class_entry ***ce TSRMLS_DC);
ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSRMLS_DC);
@@ -101,7 +101,7 @@ static zend_always_inline void i_zval_ptr_dtor_nogc(zval *zval_ptr ZEND_FILE_LIN
}
}
-static zend_always_inline int i_zend_is_true(zval *op)
+static zend_always_inline int i_zend_is_true(zval *op TSRMLS_DC)
{
int result;
@@ -130,8 +130,6 @@ static zend_always_inline int i_zend_is_true(zval *op)
break;
case IS_OBJECT:
if(IS_ZEND_STD_OBJECT(*op)) {
- TSRMLS_FETCH();
-
if (Z_OBJ_HT_P(op)->cast_object) {
zval tmp;
if (Z_OBJ_HT_P(op)->cast_object(op, &tmp, IS_BOOL TSRMLS_CC) == SUCCESS) {
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 5d5153dc13..3988074779 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -443,9 +443,9 @@ ZEND_API void _zval_internal_ptr_dtor(zval **zval_ptr ZEND_FILE_LINE_DC) /* {{{
}
/* }}} */
-ZEND_API int zend_is_true(zval *op) /* {{{ */
+ZEND_API int zend_is_true(zval *op TSRMLS_DC) /* {{{ */
{
- return i_zend_is_true(op);
+ return i_zend_is_true(op TSRMLS_CC);
}
/* }}} */
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c
index e1290b78ca..47284342fa 100644
--- a/Zend/zend_extensions.c
+++ b/Zend/zend_extensions.c
@@ -24,7 +24,7 @@
ZEND_API zend_llist zend_extensions;
static int last_resource_number;
-int zend_load_extension(const char *path)
+int zend_load_extension(const char *path TSRMLS_DC)
{
#if ZEND_EXTENSIONS_SUPPORT
DL_HANDLE handle;
@@ -107,7 +107,7 @@ int zend_load_extension(const char *path)
return FAILURE;
}
- return zend_register_extension(new_extension, handle);
+ return zend_register_extension(new_extension, handle TSRMLS_CC);
#else
fprintf(stderr, "Extensions are not supported on this platform.\n");
/* See http://support.microsoft.com/kb/190351 */
@@ -119,7 +119,7 @@ int zend_load_extension(const char *path)
}
-int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
+int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle TSRMLS_DC)
{
#if ZEND_EXTENSIONS_SUPPORT
zend_extension extension;
@@ -127,7 +127,7 @@ int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle)
extension = *new_extension;
extension.handle = handle;
- zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension);
+ zend_extension_dispatch_message(ZEND_EXTMSG_NEW_EXTENSION, &extension TSRMLS_CC);
zend_llist_add_element(&zend_extensions, &extension);
@@ -208,10 +208,8 @@ static void zend_extension_message_dispatcher(const zend_extension *extension, i
}
-ZEND_API void zend_extension_dispatch_message(int message, void *arg)
+ZEND_API void zend_extension_dispatch_message(int message, void *arg TSRMLS_DC)
{
- TSRMLS_FETCH();
-
zend_llist_apply_with_arguments(&zend_extensions, (llist_apply_with_args_func_t) zend_extension_message_dispatcher TSRMLS_CC, 2, message, arg);
}
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 3eda38aa96..38ac9f8947 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -28,7 +28,7 @@
/* The first number is the engine version and the rest is the date.
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/
-#define ZEND_EXTENSION_API_NO 220131226
+#define ZEND_EXTENSION_API_NO 220131227
typedef struct _zend_extension_version_info {
int zend_extension_api_no;
@@ -94,7 +94,7 @@ struct _zend_extension {
BEGIN_EXTERN_C()
ZEND_API int zend_get_resource_handle(zend_extension *extension);
-ZEND_API void zend_extension_dispatch_message(int message, void *arg);
+ZEND_API void zend_extension_dispatch_message(int message, void *arg TSRMLS_DC);
END_EXTERN_C()
#define ZEND_EXTMSG_NEW_EXTENSION 1
@@ -117,8 +117,8 @@ int zend_startup_extensions(void);
void zend_shutdown_extensions(TSRMLS_D);
BEGIN_EXTERN_C()
-ZEND_API int zend_load_extension(const char *path);
-ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle);
+ZEND_API int zend_load_extension(const char *path TSRMLS_DC);
+ZEND_API int zend_register_extension(zend_extension *new_extension, DL_HANDLE handle TSRMLS_DC);
ZEND_API zend_extension *zend_get_extension(const char *extension_name);
END_EXTERN_C()
diff --git a/Zend/zend_indent.c b/Zend/zend_indent.c
index cacdf8df3b..38ce669083 100644
--- a/Zend/zend_indent.c
+++ b/Zend/zend_indent.c
@@ -47,7 +47,7 @@ static void handle_whitespace(int *emit_whitespace)
}
-ZEND_API void zend_indent()
+ZEND_API void zend_indent(TSRMLS_D)
{
zval token;
int token_type;
@@ -55,7 +55,6 @@ ZEND_API void zend_indent()
int nest_level=0;
int emit_whitespace[256];
int i;
- TSRMLS_FETCH();
memset(emit_whitespace, 0, sizeof(int)*256);
diff --git a/Zend/zend_indent.h b/Zend/zend_indent.h
index 6d0996efa8..1c1afb9127 100644
--- a/Zend/zend_indent.h
+++ b/Zend/zend_indent.h
@@ -23,7 +23,7 @@
#define ZEND_INDENT_H
BEGIN_EXTERN_C()
-ZEND_API void zend_indent(void);
+ZEND_API void zend_indent(TSRMLS_D);
END_EXTERN_C()
#endif /* ZEND_INDENT_H */
diff --git a/Zend/zend_interfaces.c b/Zend/zend_interfaces.c
index 4b01eb3c4f..f9a020c656 100644
--- a/Zend/zend_interfaces.c
+++ b/Zend/zend_interfaces.c
@@ -162,7 +162,7 @@ ZEND_API int zend_user_it_valid(zend_object_iterator *_iter TSRMLS_DC)
zend_call_method_with_0_params(&object, iter->ce, &iter->ce->iterator_funcs.zf_valid, "valid", &more);
if (more) {
- result = i_zend_is_true(more);
+ result = i_zend_is_true(more TSRMLS_CC);
zval_ptr_dtor(&more);
return result ? SUCCESS : FAILURE;
}
diff --git a/Zend/zend_modules.h b/Zend/zend_modules.h
index 080d46168e..55f99c4b1d 100644
--- a/Zend/zend_modules.h
+++ b/Zend/zend_modules.h
@@ -33,7 +33,7 @@
#define ZEND_MODULE_INFO_FUNC_ARGS zend_module_entry *zend_module TSRMLS_DC
#define ZEND_MODULE_INFO_FUNC_ARGS_PASSTHRU zend_module TSRMLS_CC
-#define ZEND_MODULE_API_NO 20131226
+#define ZEND_MODULE_API_NO 20131227
#ifdef ZTS
#define USING_ZTS 1
#else
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c
index 991dca2eec..0af8e278b2 100644
--- a/Zend/zend_object_handlers.c
+++ b/Zend/zend_object_handlers.c
@@ -29,6 +29,7 @@
#include "zend_interfaces.h"
#include "zend_closures.h"
#include "zend_compile.h"
+#include "zend_hash.h"
#define DEBUG_OBJECT_HANDLERS 0
@@ -188,7 +189,7 @@ static int zend_std_call_setter(zval *object, zval *member, zval *value TSRMLS_D
zval_ptr_dtor(&value);
if (retval) {
- result = i_zend_is_true(retval) ? SUCCESS : FAILURE;
+ result = i_zend_is_true(retval TSRMLS_CC) ? SUCCESS : FAILURE;
zval_ptr_dtor(&retval);
return result;
} else {
@@ -693,12 +694,12 @@ static int zend_std_has_dimension(zval *object, zval *offset, int check_empty TS
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(&object, ce, NULL, "offsetexists", &retval, offset);
if (EXPECTED(retval != NULL)) {
- result = i_zend_is_true(retval);
+ result = i_zend_is_true(retval TSRMLS_CC);
zval_ptr_dtor(&retval);
if (check_empty && result && EXPECTED(!EG(exception))) {
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
if (retval) {
- result = i_zend_is_true(retval);
+ result = i_zend_is_true(retval TSRMLS_CC);
zval_ptr_dtor(&retval);
}
}
@@ -1442,7 +1443,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists,
guard->in_isset = 1; /* prevent circular getting */
rv = zend_std_call_issetter(object, member TSRMLS_CC);
if (rv) {
- result = zend_is_true(rv);
+ result = zend_is_true(rv TSRMLS_CC);
zval_ptr_dtor(&rv);
if (has_set_exists && result) {
if (EXPECTED(!EG(exception)) && zobj->ce->__get && !guard->in_get) {
@@ -1451,7 +1452,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists,
guard->in_get = 0;
if (rv) {
Z_ADDREF_P(rv);
- result = i_zend_is_true(rv);
+ result = i_zend_is_true(rv TSRMLS_CC);
zval_ptr_dtor(&rv);
} else {
result = 0;
@@ -1470,7 +1471,7 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists,
result = (Z_TYPE_PP(value) != IS_NULL);
break;
default:
- result = zend_is_true(*value);
+ result = zend_is_true(*value TSRMLS_CC);
break;
case 2:
result = 1;
diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h
index 1e8a831551..b2cecf229e 100644
--- a/Zend/zend_vm_def.h
+++ b/Zend/zend_vm_def.h
@@ -2104,7 +2104,7 @@ ZEND_VM_HANDLER(43, ZEND_JMPZ, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2134,7 +2134,7 @@ ZEND_VM_HANDLER(44, ZEND_JMPNZ, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2164,7 +2164,7 @@ ZEND_VM_HANDLER(45, ZEND_JMPZNZ, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2198,7 +2198,7 @@ ZEND_VM_HANDLER(46, ZEND_JMPZ_EX, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2229,7 +2229,7 @@ ZEND_VM_HANDLER(47, ZEND_JMPNZ_EX, CONST|TMP|VAR|CV, ANY)
if (OP1_TYPE == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
FREE_OP1();
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -3484,7 +3484,7 @@ ZEND_VM_HANDLER(52, ZEND_BOOL, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- ZVAL_BOOL(retval, i_zend_is_true(GET_OP1_ZVAL_PTR(BP_VAR_R)));
+ ZVAL_BOOL(retval, i_zend_is_true(GET_OP1_ZVAL_PTR(BP_VAR_R) TSRMLS_CC));
FREE_OP1();
CHECK_EXCEPTION();
@@ -4647,7 +4647,7 @@ ZEND_VM_HANDLER(114, ZEND_ISSET_ISEMPTY_VAR, CONST|TMP|VAR|CV, UNUSED|CONST|VAR)
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -4719,7 +4719,7 @@ ZEND_VM_C_LABEL(num_index_prop):
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -4913,7 +4913,7 @@ ZEND_VM_HANDLER(152, ZEND_JMP_SET, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
value = GET_OP1_ZVAL_PTR(BP_VAR_R);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!IS_OP1_TMP_FREE()) {
zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
@@ -4939,7 +4939,7 @@ ZEND_VM_HANDLER(158, ZEND_JMP_SET_VAR, CONST|TMP|VAR|CV, ANY)
SAVE_OPLINE();
value = GET_OP1_ZVAL_PTR(BP_VAR_R);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
if (OP1_TYPE == IS_VAR || OP1_TYPE == IS_CV) {
Z_ADDREF_P(value);
EX_T(opline->result.var).var.ptr = value;
@@ -5094,7 +5094,7 @@ ZEND_VM_HANDLER(105, ZEND_TICKS, ANY, ANY)
if (++EG(ticks_count)>=opline->extended_value) {
EG(ticks_count)=0;
if (zend_ticks_function) {
- zend_ticks_function(opline->extended_value);
+ zend_ticks_function(opline->extended_value TSRMLS_CC);
}
}
CHECK_EXCEPTION();
diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h
index 7e613cd6e8..49d04a2bae 100644
--- a/Zend/zend_vm_execute.h
+++ b/Zend/zend_vm_execute.h
@@ -1107,7 +1107,7 @@ static int ZEND_FASTCALL ZEND_TICKS_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (++EG(ticks_count)>=opline->extended_value) {
EG(ticks_count)=0;
if (zend_ticks_function) {
- zend_ticks_function(opline->extended_value);
+ zend_ticks_function(opline->extended_value TSRMLS_CC);
}
}
CHECK_EXCEPTION();
@@ -2416,7 +2416,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2446,7 +2446,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2476,7 +2476,7 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2510,7 +2510,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2541,7 +2541,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
if (IS_CONST == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -2769,7 +2769,7 @@ static int ZEND_FASTCALL ZEND_BOOL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- ZVAL_BOOL(retval, i_zend_is_true(opline->op1.zv));
+ ZVAL_BOOL(retval, i_zend_is_true(opline->op1.zv TSRMLS_CC));
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -3226,7 +3226,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_AR
SAVE_OPLINE();
value = opline->op1.zv;
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!0) {
zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
@@ -3251,7 +3251,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLE
SAVE_OPLINE();
value = opline->op1.zv;
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
if (IS_CONST == IS_VAR || IS_CONST == IS_CV) {
Z_ADDREF_P(value);
EX_T(opline->result.var).var.ptr = value;
@@ -4282,7 +4282,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_CONST_HANDLER(ZEND_O
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -6021,7 +6021,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_VAR_HANDLER(ZEND_OPC
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -6726,7 +6726,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CONST_UNUSED_HANDLER(ZEND_
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -7726,7 +7726,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -7756,7 +7756,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -7786,7 +7786,7 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -7820,7 +7820,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -7851,7 +7851,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (IS_TMP_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_dtor(free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -8067,7 +8067,7 @@ static int ZEND_FASTCALL ZEND_BOOL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC)));
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC));
zval_dtor(free_op1.var);
CHECK_EXCEPTION();
@@ -8554,7 +8554,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS
SAVE_OPLINE();
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!1) {
zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
@@ -8580,7 +8580,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_
SAVE_OPLINE();
value = _get_zval_ptr_tmp(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
if (IS_TMP_VAR == IS_VAR || IS_TMP_VAR == IS_CV) {
Z_ADDREF_P(value);
EX_T(opline->result.var).var.ptr = value;
@@ -9539,7 +9539,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_CONST_HANDLER(ZEND_OPC
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -11242,7 +11242,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_VAR_HANDLER(ZEND_OPCOD
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -11822,7 +11822,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_TMP_UNUSED_HANDLER(ZEND_OP
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -12924,7 +12924,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
zval_ptr_dtor_nogc(&free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -12954,7 +12954,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
zval_ptr_dtor_nogc(&free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -12984,7 +12984,7 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_ptr_dtor_nogc(&free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -13018,7 +13018,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_ptr_dtor_nogc(&free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -13049,7 +13049,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (IS_VAR == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
zval_ptr_dtor_nogc(&free_op1.var);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -13370,7 +13370,7 @@ static int ZEND_FASTCALL ZEND_BOOL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC)));
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC) TSRMLS_CC));
zval_ptr_dtor_nogc(&free_op1.var);
CHECK_EXCEPTION();
@@ -13969,7 +13969,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS
SAVE_OPLINE();
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!0) {
zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
@@ -13995,7 +13995,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_
SAVE_OPLINE();
value = _get_zval_ptr_var(opline->op1.var, execute_data, &free_op1 TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
if (IS_VAR == IS_VAR || IS_VAR == IS_CV) {
Z_ADDREF_P(value);
EX_T(opline->result.var).var.ptr = value;
@@ -16257,7 +16257,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_CONST_HANDLER(ZEND_OPC
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -16329,7 +16329,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -18399,7 +18399,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -20777,7 +20777,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_VAR_HANDLER(ZEND_OPCOD
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -20849,7 +20849,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -22051,7 +22051,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_VAR_UNUSED_HANDLER(ZEND_OP
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -24116,7 +24116,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -25611,7 +25611,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -26920,7 +26920,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -28229,7 +28229,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -29960,7 +29960,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -30444,7 +30444,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -30474,7 +30474,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
ret = Z_LVAL_P(val);
} else {
- ret = i_zend_is_true(val);
+ ret = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -30504,7 +30504,7 @@ static int ZEND_FASTCALL ZEND_JMPZNZ_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -30538,7 +30538,7 @@ static int ZEND_FASTCALL ZEND_JMPZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -30569,7 +30569,7 @@ static int ZEND_FASTCALL ZEND_JMPNZ_EX_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (IS_CV == IS_TMP_VAR && EXPECTED(Z_TYPE_P(val) == IS_BOOL)) {
retval = Z_LVAL_P(val);
} else {
- retval = i_zend_is_true(val);
+ retval = i_zend_is_true(val TSRMLS_CC);
if (UNEXPECTED(EG(exception) != NULL)) {
HANDLE_EXCEPTION();
@@ -30874,7 +30874,7 @@ static int ZEND_FASTCALL ZEND_BOOL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SAVE_OPLINE();
/* PHP 3.0 returned "" for false and 1 for true, here we use 0 and 1 for now */
- ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC)));
+ ZVAL_BOOL(retval, i_zend_is_true(_get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC) TSRMLS_CC));
CHECK_EXCEPTION();
ZEND_VM_NEXT_OPCODE();
@@ -31331,7 +31331,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
SAVE_OPLINE();
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
ZVAL_COPY_VALUE(&EX_T(opline->result.var).tmp_var, value);
if (!0) {
zendi_zval_copy_ctor(EX_T(opline->result.var).tmp_var);
@@ -31356,7 +31356,7 @@ static int ZEND_FASTCALL ZEND_JMP_SET_VAR_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_A
SAVE_OPLINE();
value = _get_zval_ptr_cv_BP_VAR_R(execute_data, opline->op1.var TSRMLS_CC);
- if (i_zend_is_true(value)) {
+ if (i_zend_is_true(value TSRMLS_CC)) {
if (IS_CV == IS_VAR || IS_CV == IS_CV) {
Z_ADDREF_P(value);
EX_T(opline->result.var).var.ptr = value;
@@ -33384,7 +33384,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_CONST_HANDLER(ZEND_OPCO
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -33456,7 +33456,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -35387,7 +35387,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -37625,7 +37625,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_VAR_HANDLER(ZEND_OPCODE
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -37697,7 +37697,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
@@ -38769,7 +38769,7 @@ static int ZEND_FASTCALL ZEND_ISSET_ISEMPTY_VAR_SPEC_CV_UNUSED_HANDLER(ZEND_OPC
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 1);
} else {
ZVAL_BOOL(&EX_T(opline->result.var).tmp_var, 0);
@@ -40675,7 +40675,7 @@ num_index_prop:
result = isset;
}
} else /* if (opline->extended_value & ZEND_ISEMPTY) */ {
- if (!isset || !i_zend_is_true(*value)) {
+ if (!isset || !i_zend_is_true(*value TSRMLS_CC)) {
result = 0;
} else {
result = 1;
diff --git a/configure.in b/configure.in
index 3369b9a4f6..8781cbc459 100644
--- a/configure.in
+++ b/configure.in
@@ -118,7 +118,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
])
PHP_MAJOR_VERSION=5
-PHP_MINOR_VERSION=6
+PHP_MINOR_VERSION=7
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="-dev"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re
index 0bb8fe68b3..f9595889ec 100644
--- a/ext/date/lib/parse_date.re
+++ b/ext/date/lib/parse_date.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re
index cbbf8781bf..8c82cfc3b9 100644
--- a/ext/date/lib/parse_iso_intervals.re
+++ b/ext/date/lib/parse_iso_intervals.re
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2013 The PHP Group |
+ | Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c
index 4d8eae73ac..6067e99154 100644
--- a/ext/dba/dba_inifile.c
+++ b/ext/dba/dba_inifile.c
@@ -124,14 +124,15 @@ DBA_EXISTS_FUNC(inifile)
DBA_DELETE_FUNC(inifile)
{
int res;
+ zend_bool found = 0;
INIFILE_DATA;
INIFILE_GKEY;
- res = inifile_delete(dba, &ini_key TSRMLS_CC);
+ res = inifile_delete_ex(dba, &ini_key, &found TSRMLS_CC);
INIFILE_DONE;
- return (res == -1 ? FAILURE : SUCCESS);
+ return (res == -1 || !found ? FAILURE : SUCCESS);
}
DBA_FIRSTKEY_FUNC(inifile)
diff --git a/ext/dba/libinifile/inifile.c b/ext/dba/libinifile/inifile.c
index 8c771beba4..218037ebe3 100644
--- a/ext/dba/libinifile/inifile.c
+++ b/ext/dba/libinifile/inifile.c
@@ -402,7 +402,7 @@ static int inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifi
return FAILURE;
}
php_stream_seek(dba->fp, pos_start, SEEK_SET);
- if (!php_stream_copy_to_stream_ex(dba->fp, fp, pos_end - pos_start, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(dba->fp, fp, pos_end - pos_start, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy group [%zu - %zu] to temporary stream", pos_start, pos_end);
return FAILURE;
}
@@ -413,7 +413,7 @@ static int inifile_copy_to(inifile *dba, size_t pos_start, size_t pos_end, inifi
/* {{{ inifile_filter
* copy from to dba while ignoring key name (group must equal)
*/
-static int inifile_filter(inifile *dba, inifile *from, const key_type *key TSRMLS_DC)
+static int inifile_filter(inifile *dba, inifile *from, const key_type *key, zend_bool *found TSRMLS_DC)
{
size_t pos_start = 0, pos_next = 0, pos_curr;
int ret = SUCCESS;
@@ -424,10 +424,13 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key TSRML
while(inifile_read(from, &ln TSRMLS_CC)) {
switch(inifile_key_cmp(&ln.key, key TSRMLS_CC)) {
case 0:
+ if (found) {
+ *found = (zend_bool) 1;
+ }
pos_curr = php_stream_tell(from->fp);
if (pos_start != pos_next) {
php_stream_seek(from->fp, pos_start, SEEK_SET);
- if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy [%zu - %zu] from temporary stream", pos_next, pos_start);
ret = FAILURE;
}
@@ -446,7 +449,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key TSRML
}
if (pos_start != pos_next) {
php_stream_seek(from->fp, pos_start, SEEK_SET);
- if (!php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(from->fp, dba->fp, pos_next - pos_start, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy [%zu - %zu] from temporary stream", pos_next, pos_start);
ret = FAILURE;
}
@@ -458,7 +461,7 @@ static int inifile_filter(inifile *dba, inifile *from, const key_type *key TSRML
/* {{{ inifile_delete_replace_append
*/
-static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append TSRMLS_DC)
+static int inifile_delete_replace_append(inifile *dba, const key_type *key, const val_type *value, int append, zend_bool *found TSRMLS_DC)
{
size_t pos_grp_start=0, pos_grp_next;
inifile *ini_tmp = NULL;
@@ -497,7 +500,7 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
php_stream_seek(dba->fp, 0, SEEK_END);
if (pos_grp_next != (size_t)php_stream_tell(dba->fp)) {
php_stream_seek(dba->fp, pos_grp_next, SEEK_SET);
- if (!php_stream_copy_to_stream_ex(dba->fp, fp_tmp, PHP_STREAM_COPY_ALL, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(dba->fp, fp_tmp, PHP_STREAM_COPY_ALL, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not copy remainder to temporary stream");
ret = FAILURE;
}
@@ -516,7 +519,7 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
if (key->name && strlen(key->name)) {
/* 6 */
if (!append && ini_tmp) {
- ret = inifile_filter(dba, ini_tmp, key TSRMLS_CC);
+ ret = inifile_filter(dba, ini_tmp, key, found TSRMLS_CC);
}
/* 7 */
@@ -538,7 +541,7 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
if (fp_tmp && php_stream_tell(fp_tmp)) {
php_stream_seek(fp_tmp, 0, SEEK_SET);
php_stream_seek(dba->fp, 0, SEEK_END);
- if (!php_stream_copy_to_stream_ex(fp_tmp, dba->fp, PHP_STREAM_COPY_ALL, NULL)) {
+ if (SUCCESS != php_stream_copy_to_stream_ex(fp_tmp, dba->fp, PHP_STREAM_COPY_ALL, NULL)) {
php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Could not copy from temporary stream - ini file truncated");
ret = FAILURE;
}
@@ -563,7 +566,15 @@ static int inifile_delete_replace_append(inifile *dba, const key_type *key, cons
*/
int inifile_delete(inifile *dba, const key_type *key TSRMLS_DC)
{
- return inifile_delete_replace_append(dba, key, NULL, 0 TSRMLS_CC);
+ return inifile_delete_replace_append(dba, key, NULL, 0, NULL TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ inifile_delete_ex
+ */
+int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found TSRMLS_DC)
+{
+ return inifile_delete_replace_append(dba, key, NULL, 0, found TSRMLS_CC);
}
/* }}} */
@@ -571,7 +582,15 @@ int inifile_delete(inifile *dba, const key_type *key TSRMLS_DC)
*/
int inifile_replace(inifile *dba, const key_type *key, const val_type *value TSRMLS_DC)
{
- return inifile_delete_replace_append(dba, key, value, 0 TSRMLS_CC);
+ return inifile_delete_replace_append(dba, key, value, 0, NULL TSRMLS_CC);
+}
+/* }}} */
+
+/* {{{ inifile_replace_ex
+ */
+int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *value, zend_bool *found TSRMLS_DC)
+{
+ return inifile_delete_replace_append(dba, key, value, 0, found TSRMLS_CC);
}
/* }}} */
@@ -579,7 +598,7 @@ int inifile_replace(inifile *dba, const key_type *key, const val_type *value TSR
*/
int inifile_append(inifile *dba, const key_type *key, const val_type *value TSRMLS_DC)
{
- return inifile_delete_replace_append(dba, key, value, 1 TSRMLS_CC);
+ return inifile_delete_replace_append(dba, key, value, 1, NULL TSRMLS_CC);
}
/* }}} */
diff --git a/ext/dba/libinifile/inifile.h b/ext/dba/libinifile/inifile.h
index 1177610185..e41dac0ca4 100644
--- a/ext/dba/libinifile/inifile.h
+++ b/ext/dba/libinifile/inifile.h
@@ -49,7 +49,9 @@ val_type inifile_fetch(inifile *dba, const key_type *key, int skip TSRMLS_DC);
int inifile_firstkey(inifile *dba TSRMLS_DC);
int inifile_nextkey(inifile *dba TSRMLS_DC);
int inifile_delete(inifile *dba, const key_type *key TSRMLS_DC);
+int inifile_delete_ex(inifile *dba, const key_type *key, zend_bool *found TSRMLS_DC);
int inifile_replace(inifile *dba, const key_type *key, const val_type *val TSRMLS_DC);
+int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, zend_bool *found TSRMLS_DC);
int inifile_append(inifile *dba, const key_type *key, const val_type *val TSRMLS_DC);
char *inifile_version();
diff --git a/ext/dba/tests/bug62490.phpt b/ext/dba/tests/bug62490.phpt
new file mode 100644
index 0000000000..325dd34554
--- /dev/null
+++ b/ext/dba/tests/bug62490.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Bug #62490 (dba_delete returns true on missing item (inifile))
+--SKIPIF--
+<?php
+$handler = "inifile";
+include "skipif.inc";
+?>
+--FILE--
+<?php
+$handler = "inifile";
+include "test.inc";
+
+$dba = dba_open($db_filename, "n", $handler)
+ or die;
+for ($i = 0; $i < 3; ++$i) {
+ echo "insert $i:";
+ var_dump(dba_insert("a", $i, $dba));
+}
+
+echo "exists:";
+var_dump(dba_exists("a", $dba));
+echo "delete:";
+var_dump(dba_delete("a", $dba));
+echo "exists:";
+var_dump(dba_exists("a", $dba));
+echo "delete:";
+var_dump(dba_delete("a", $dba));
+
+?>
+===DONE===
+--CLEAN--
+<?php
+include "clean.inc";
+?>
+--EXPECT--
+insert 0:bool(true)
+insert 1:bool(true)
+insert 2:bool(true)
+exists:bool(true)
+delete:bool(true)
+exists:bool(false)
+delete:bool(false)
+===DONE===
diff --git a/ext/dba/tests/dba_db4_003.phpt b/ext/dba/tests/dba_db4_003.phpt
index 7e8568c085..8708170fc1 100644
--- a/ext/dba/tests/dba_db4_003.phpt
+++ b/ext/dba/tests/dba_db4_003.phpt
@@ -39,8 +39,6 @@ require(dirname(__FILE__) .'/clean.inc');
database handler: db4
int(14)
-Notice: dba_open(): %stest0.dbm: unexpected file type or format in %sdba_db4_003.php on line %d
-
Warning: dba_open(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_003.php on line %d
Error creating %stest0.dbm
Dummy contents
diff --git a/ext/dba/tests/dba_db4_007.phpt b/ext/dba/tests/dba_db4_007.phpt
index bd95e0bec7..027d0af032 100644
--- a/ext/dba/tests/dba_db4_007.phpt
+++ b/ext/dba/tests/dba_db4_007.phpt
@@ -35,7 +35,5 @@ require(dirname(__FILE__) .'/clean.inc');
database handler: db4
int(14)
-Notice: dba_popen(): %stest0.dbm: unexpected file type or format in %sdba_db4_007.php on line %d
-
Warning: dba_popen(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_007.php on line %d
Error creating %stest0.dbm
diff --git a/ext/dba/tests/dba_db4_010.phpt b/ext/dba/tests/dba_db4_010.phpt
deleted file mode 100644
index fb31f05835..0000000000
--- a/ext/dba/tests/dba_db4_010.phpt
+++ /dev/null
@@ -1,38 +0,0 @@
---TEST--
-DBA DB4 magic_quotes_runtime Test
---SKIPIF--
-<?php
-$handler = "db4";
-require_once(dirname(__FILE__) .'/skipif.inc');
-die("info $HND handler used");
-?>
---FILE--
-<?php
-$handler = "db4";
-require_once(dirname(__FILE__) .'/test.inc');
-echo "database handler: $handler\n";
-if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
- ini_set('magic_quotes_runtime', 0);
- dba_insert("key1", '"', $db_file);
- var_dump(dba_fetch("key1", $db_file));
- ini_set('magic_quotes_runtime', 1);
- var_dump(dba_fetch("key1", $db_file));
- dba_replace("key1", '\"', $db_file);
- var_dump(dba_fetch("key1", $db_file));
- ini_set('magic_quotes_runtime', 0);
- var_dump(dba_fetch("key1", $db_file));
- dba_close($db_file);
-} else {
- echo "Error creating database\n";
-}
-?>
---CLEAN--
-<?php
-require(dirname(__FILE__) .'/clean.inc');
-?>
---EXPECTF--
-database handler: db4
-string(1) """
-string(2) "\""
-string(2) "\""
-string(1) """
diff --git a/ext/dba/tests/dba_handler.inc b/ext/dba/tests/dba_handler.inc
index a950e903af..ed2a52400a 100644
--- a/ext/dba/tests/dba_handler.inc
+++ b/ext/dba/tests/dba_handler.inc
@@ -82,7 +82,7 @@ do {
dba_close($dba_reader);
}
if (($db_file = dba_popen($db_filename, 'r'.($lock_flag==''?'':'-'), $handler))!==FALSE) {
- if ($handler == 'dbm') {
+ if ($handler == 'dbm' || $handler == "tcadb") {
dba_close($db_file);
}
}
diff --git a/ext/dba/tests/dba_inifile.phpt b/ext/dba/tests/dba_inifile.phpt
index 5975d25f4d..ae06aee09f 100644
--- a/ext/dba/tests/dba_inifile.phpt
+++ b/ext/dba/tests/dba_inifile.phpt
@@ -12,6 +12,10 @@ DBA INIFILE handler test
require_once dirname(__FILE__) .'/dba_handler.inc';
?>
===DONE===
+--CLEAN--
+<?php
+ require(dirname(__FILE__) .'/clean.inc');
+?>
--EXPECT--
database handler: inifile
3NYNYY
@@ -19,7 +23,7 @@ Content String 2
Content 2 replaced
Read during write: not allowed
"key number 6" written
-Failed to write "key number 6" 2nd time
+"key number 6" written 2nd time
Content 2 replaced 2nd time
The 6th value
array(3) {
@@ -36,7 +40,7 @@ Content String 2
Content 2 replaced
Read during write: not allowed
"key number 6" written
-Failed to write "key number 6" 2nd time
+"key number 6" written 2nd time
Content 2 replaced 2nd time
The 6th value
array(3) {
diff --git a/ext/dba/tests/dba_tcadb.phpt b/ext/dba/tests/dba_tcadb.phpt
index 28b6dd8f0b..f75aa813d4 100644
--- a/ext/dba/tests/dba_tcadb.phpt
+++ b/ext/dba/tests/dba_tcadb.phpt
@@ -16,6 +16,12 @@ DBA TCADB handler test
require_once dirname(__FILE__) .'/dba_handler.inc';
?>
===DONE===
+--CLEAN--
+<?php
+$db_filename = $db_file = dirname(__FILE__) .'/test0.tch';
+@unlink($db_filename);
+@unlink($db_filename.'.lck');
+?>
--EXPECT--
database handler: tcadb
3NYNYY
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c
index 0623dbdcde..bfe966bd82 100644
--- a/ext/dom/php_dom.c
+++ b/ext/dom/php_dom.c
@@ -448,7 +448,7 @@ static int dom_property_exists(zval *object, zval *member, int check_empty, cons
Z_SET_REFCOUNT_P(tmp, 1);
Z_UNSET_ISREF_P(tmp);
if (check_empty == 1) {
- retval = zend_is_true(tmp);
+ retval = zend_is_true(tmp TSRMLS_CC);
} else if (check_empty == 0) {
retval = (Z_TYPE_P(tmp) != IS_NULL);
}
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index ac2bf344ff..aa8e8d3a74 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -1050,7 +1050,15 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi
}
/* transform glyph image */
- FT_Get_Glyph(slot, &image);
+ if (FT_Get_Glyph(slot, &image)) {
+ if (tmpstr) {
+ gdFree(tmpstr);
+ }
+ gdCacheDelete(tc_cache);
+ gdMutexUnlock(gdFontCacheMutex);
+ return "Problem loading glyph";
+ }
+
if (brect) { /* only if need brect */
FT_Glyph_Get_CBox(image, ft_glyph_bbox_gridfit, &glyph_bbox);
glyph_bbox.xMin += penf.x;
diff --git a/ext/json/json.c b/ext/json/json.c
index f38cc11ac5..d939a7deab 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -190,10 +190,10 @@ static int json_determine_array_type(zval **val TSRMLS_DC) /* {{{ */
}
if (i == HASH_KEY_IS_STRING) {
- return 1;
+ return PHP_JSON_OUTPUT_OBJECT;
} else {
if (index != idx) {
- return 1;
+ return PHP_JSON_OUTPUT_OBJECT;
}
}
idx++;
diff --git a/ext/libxml/tests/libxml_disable_entity_loader.phpt b/ext/libxml/tests/libxml_disable_entity_loader.phpt
new file mode 100644
index 0000000000..6477543fb2
--- /dev/null
+++ b/ext/libxml/tests/libxml_disable_entity_loader.phpt
@@ -0,0 +1,41 @@
+--TEST--
+libxml_disable_entity_loader()
+--SKIPIF--
+<?php if (!extension_loaded('libxml') || !extension_loaded('dom') || defined('PHP_WINDOWS_VERSION_MAJOR')) die('skip'); ?>
+--FILE--
+<?php
+
+$xml = <<<EOT
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE test [<!ENTITY xxe SYSTEM "XXE_URI">]>
+<foo>&xxe;</foo>
+EOT;
+
+$xml = str_replace('XXE_URI', __DIR__ . '/libxml_disable_entity_loader_payload.txt', $xml);
+
+function parseXML($xml) {
+ $doc = new DOMDocument();
+ $doc->resolveExternals = true;
+ $doc->substituteEntities = true;
+ $doc->validateOnParse = false;
+ $doc->loadXML($xml, 0);
+ return $doc->saveXML();
+}
+
+var_dump(strpos(parseXML($xml), 'SECRET_DATA') !== false);
+var_dump(libxml_disable_entity_loader(true));
+var_dump(strpos(parseXML($xml), 'SECRET_DATA') === false);
+
+echo "Done\n";
+?>
+--EXPECTF--
+bool(true)
+bool(false)
+
+Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "%s" in %s on line %d
+
+Warning: DOMDocument::loadXML(): Failure to process entity xxe in Entity, line: %d in %s on line %d
+
+Warning: DOMDocument::loadXML(): Entity 'xxe' not defined in Entity, line: %d in %s on line %d
+bool(true)
+Done
diff --git a/ext/libxml/tests/libxml_disable_entity_loader_payload.txt b/ext/libxml/tests/libxml_disable_entity_loader_payload.txt
new file mode 100644
index 0000000000..3b8a43cc1d
--- /dev/null
+++ b/ext/libxml/tests/libxml_disable_entity_loader_payload.txt
@@ -0,0 +1 @@
+SECRET_DATA \ No newline at end of file
diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c
index fadcbd87f6..226c855b3d 100644
--- a/ext/mysqlnd/mysqlnd_net.c
+++ b/ext/mysqlnd/mysqlnd_net.c
@@ -900,7 +900,11 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC)
ZVAL_STRING(&cipher_zval, net->data->options.ssl_cipher, 0);
php_stream_context_set_option(context, "ssl", "ciphers", &cipher_zval);
}
+#if PHP_API_VERSION >= 20131106
+ php_stream_context_set(net_stream, context TSRMLS_CC);
+#else
php_stream_context_set(net_stream, context);
+#endif
if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL TSRMLS_CC) < 0 ||
php_stream_xport_crypto_enable(net_stream, 1 TSRMLS_CC) < 0)
{
@@ -916,7 +920,11 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC)
of the context, which means usage of already freed memory, bad. Actually we don't need this
context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it.
*/
+#if PHP_API_VERSION >= 20131106
+ php_stream_context_set(net_stream, NULL TSRMLS_CC);
+#else
php_stream_context_set(net_stream, NULL);
+#endif
if (net->data->options.timeout_read) {
struct timeval tv;
diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c
index 8096cbbbd9..2d270c9b2f 100644
--- a/ext/mysqlnd/mysqlnd_ps.c
+++ b/ext/mysqlnd/mysqlnd_ps.c
@@ -38,6 +38,7 @@ const char * const mysqlnd_stmt_not_prepared = "Statement not prepared";
/* Exported by mysqlnd_ps_codec.c */
enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC);
+enum_func_status mysqlnd_stmt_execute_batch_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC);
enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param,
unsigned int flags,
diff --git a/ext/opcache/Optimizer/block_pass.c b/ext/opcache/Optimizer/block_pass.c
index fff5d7e101..a6114733e3 100644
--- a/ext/opcache/Optimizer/block_pass.c
+++ b/ext/opcache/Optimizer/block_pass.c
@@ -1466,7 +1466,12 @@ static void zend_jmp_optimization(zend_code_block *block, zend_op_array *op_arra
case ZEND_JMPNZ:
/* constant conditional JMPs */
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op) TSRMLS_CC);
+#else
int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op));
+#endif
+
if (last_op->opcode == ZEND_JMPZ) {
should_jmp = !should_jmp;
}
@@ -1609,7 +1614,12 @@ next_target:
case ZEND_JMPZ_EX:
/* constant conditional JMPs */
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op) TSRMLS_CC);
+#else
int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(last_op));
+#endif
+
if (last_op->opcode == ZEND_JMPZ_EX) {
should_jmp = !should_jmp;
}
@@ -1730,7 +1740,11 @@ next_target_ex:
}
if (ZEND_OP1_TYPE(last_op) == IS_CONST) {
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ if (!zend_is_true(&ZEND_OP1_LITERAL(last_op) TSRMLS_CC)) {
+#else
if (!zend_is_true(&ZEND_OP1_LITERAL(last_op))) {
+#endif
/* JMPZNZ(false,L1,L2) -> JMP(L1) */
zend_code_block *todel;
diff --git a/ext/opcache/Optimizer/pass2.c b/ext/opcache/Optimizer/pass2.c
index 30708a0935..d5f4f0492b 100644
--- a/ext/opcache/Optimizer/pass2.c
+++ b/ext/opcache/Optimizer/pass2.c
@@ -89,7 +89,11 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
/* convert Ti = JMPZ_EX(C, L) => Ti = QM_ASSIGN(C)
in case we know it wouldn't jump */
} else if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(opline) TSRMLS_CC);
+#else
int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(opline));
+#endif
if (opline->opcode == ZEND_JMPZ_EX) {
should_jmp = !should_jmp;
}
@@ -103,7 +107,11 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
case ZEND_JMPZ:
case ZEND_JMPNZ:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(opline) TSRMLS_CC);
+#else
int should_jmp = zend_is_true(&ZEND_OP1_LITERAL(opline));
+#endif
if (opline->opcode == ZEND_JMPZ) {
should_jmp = !should_jmp;
@@ -139,8 +147,11 @@ if (ZEND_OPTIMIZER_PASS_2 & OPTIMIZATION_LEVEL) {
case ZEND_JMPZNZ:
if (ZEND_OP1_TYPE(opline) == IS_CONST) {
int opline_num;
-
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ if (zend_is_true(&ZEND_OP1_LITERAL(opline) TSRMLS_CC)) {
+#else
if (zend_is_true(&ZEND_OP1_LITERAL(opline))) {
+#endif
opline_num = opline->extended_value; /* JMPNZ */
} else {
opline_num = ZEND_OP2(opline).opline_num; /* JMPZ */
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 45c0cf628a..d1c9dfcd35 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -2550,7 +2550,11 @@ static int accel_startup(zend_extension *extension)
_setmaxstdio(2048); /* The default configuration is limited to 512 stdio files */
#endif
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+ if (start_accel_module(TSRMLS_C) == FAILURE) {
+#else
if (start_accel_module() == FAILURE) {
+#endif
accel_startup_ok = 0;
zend_error(E_WARNING, ACCELERATOR_PRODUCT_NAME ": module registration failed!");
return FAILURE;
diff --git a/ext/opcache/ZendAccelerator.h b/ext/opcache/ZendAccelerator.h
index e799f0ae02..56e6cd508d 100644
--- a/ext/opcache/ZendAccelerator.h
+++ b/ext/opcache/ZendAccelerator.h
@@ -92,6 +92,7 @@
#define PHP_5_3_X_API_NO 220090626
#define PHP_5_4_X_API_NO 220100525
#define PHP_5_5_X_API_NO 220121212
+#define PHP_5_6_X_API_NO 220131106
/*** file locking ***/
#ifndef ZEND_WIN32
diff --git a/ext/opcache/zend_accelerator_module.c b/ext/opcache/zend_accelerator_module.c
index 83e7d4ca2b..b98623e1f2 100644
--- a/ext/opcache/zend_accelerator_module.c
+++ b/ext/opcache/zend_accelerator_module.c
@@ -474,10 +474,17 @@ static zend_module_entry accel_module_entry = {
STANDARD_MODULE_PROPERTIES
};
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+int start_accel_module(TSRMLS_D)
+{
+ return zend_startup_module(&accel_module_entry TSRMLS_CC);
+}
+#else
int start_accel_module(void)
{
return zend_startup_module(&accel_module_entry);
}
+#endif
/* {{{ proto array accelerator_get_scripts()
Get the scripts which are accelerated by ZendAccelerator */
diff --git a/ext/opcache/zend_accelerator_module.h b/ext/opcache/zend_accelerator_module.h
index ece4a7d6b5..6e772b8c7e 100644
--- a/ext/opcache/zend_accelerator_module.h
+++ b/ext/opcache/zend_accelerator_module.h
@@ -22,7 +22,12 @@
#ifndef ZEND_ACCELERATOR_MODULE_H
#define ZEND_ACCELERATOR_MODULE_H
+#if ZEND_EXTENSION_API_NO > PHP_5_6_X_API_NO
+int start_accel_module(TSRMLS_D);
+#else
int start_accel_module(void);
+#endif
+
void zend_accel_override_file_functions(TSRMLS_D);
#endif /* _ZEND_ACCELERATOR_MODULE_H */
diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c
index 631d4756e4..244f04def9 100644
--- a/ext/openssl/xp_ssl.c
+++ b/ext/openssl/xp_ssl.c
@@ -926,7 +926,7 @@ static char * get_sni(php_stream_context *ctx, const char *resourcename, size_t
if (ctx) {
zval **val = NULL;
- if (php_stream_context_get_option(ctx, "ssl", "SNI_enabled", &val) == SUCCESS && !zend_is_true(*val)) {
+ if (php_stream_context_get_option(ctx, "ssl", "SNI_enabled", &val) == SUCCESS && !zend_is_true(*val TSRMLS_CC)) {
return NULL;
}
if (php_stream_context_get_option(ctx, "ssl", "SNI_server_name", &val) == SUCCESS) {
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index b7ef4c729c..4c7f1784aa 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -499,7 +499,7 @@ PHP_MINIT_FUNCTION(pcntl)
{
php_register_signal_constants(INIT_FUNC_ARGS_PASSTHRU);
php_pcntl_register_errno_constants(INIT_FUNC_ARGS_PASSTHRU);
- php_add_tick_function(pcntl_signal_dispatch);
+ php_add_tick_function(pcntl_signal_dispatch TSRMLS_CC);
return SUCCESS;
}
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index 32e88510e7..12f23bf0e2 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -1189,7 +1189,7 @@ static xmlNodePtr to_xml_bool(encodeTypePtr type, zval *data, int style, xmlNode
xmlAddChild(parent, ret);
FIND_ZVAL_NULL(data, ret, style);
- if (zend_is_true(data)) {
+ if (zend_is_true(data TSRMLS_CC)) {
xmlNodeSetContent(ret, BAD_CAST("true"));
} else {
xmlNodeSetContent(ret, BAD_CAST("false"));
diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c
index f41d0fb9cd..9270132ff7 100644
--- a/ext/spl/spl_array.c
+++ b/ext/spl/spl_array.c
@@ -599,7 +599,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
SEPARATE_ARG_IF_REF(offset);
zend_call_method_with_1_params(&object, Z_OBJCE_P(object), &intern->fptr_offset_has, "offsetExists", &rv, offset);
zval_ptr_dtor(&offset);
- if (rv && zend_is_true(rv)) {
+ if (rv && zend_is_true(rv TSRMLS_CC)) {
zval_ptr_dtor(&rv);
return 1;
}
@@ -620,7 +620,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
case 2:
return 1;
default:
- return zend_is_true(*tmp);
+ return zend_is_true(*tmp TSRMLS_CC);
}
}
}
@@ -643,7 +643,7 @@ static int spl_array_has_dimension_ex(int check_inherited, zval *object, zval *o
case 2:
return 1;
default:
- return zend_is_true(*tmp);
+ return zend_is_true(*tmp TSRMLS_CC);
}
}
return 0;
diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c
index 5f32feaaf0..4abbdf9df8 100644
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@ -836,7 +836,7 @@ SPL_METHOD(DirectoryIterator, seek)
int valid = 0;
zend_call_method_with_0_params(&this_ptr, Z_OBJCE_P(getThis()), &intern->u.dir.func_valid, "valid", &retval);
if (retval) {
- valid = zend_is_true(retval);
+ valid = zend_is_true(retval TSRMLS_CC);
zval_ptr_dtor(&retval);
}
if (!valid) {
@@ -1497,7 +1497,7 @@ SPL_METHOD(RecursiveDirectoryIterator, hasChildren)
spl_filesystem_object_get_file_name(intern TSRMLS_CC);
if (!allow_links && !(intern->flags & SPL_FILE_DIR_FOLLOW_SYMLINKS)) {
php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC);
- if (zend_is_true(return_value)) {
+ if (zend_is_true(return_value TSRMLS_CC)) {
RETURN_FALSE;
}
}
diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c
index 0519edaa2b..dcd1582d60 100644
--- a/ext/spl/spl_fixedarray.c
+++ b/ext/spl/spl_fixedarray.c
@@ -511,7 +511,7 @@ static inline int spl_fixedarray_object_has_dimension_helper(spl_fixedarray_obje
if (!intern->array->elements[index]) {
retval = 0;
} else if (check_empty) {
- if (zend_is_true(intern->array->elements[index])) {
+ if (zend_is_true(intern->array->elements[index] TSRMLS_CC)) {
retval = 1;
} else {
retval = 0;
@@ -540,7 +540,7 @@ static int spl_fixedarray_object_has_dimension(zval *object, zval *offset, int c
zval_ptr_dtor(&intern->retval);
MAKE_STD_ZVAL(intern->retval);
ZVAL_ZVAL(intern->retval, rv, 1, 1);
- return zend_is_true(intern->retval);
+ return zend_is_true(intern->retval TSRMLS_CC);
}
return 0;
}
diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c
index a89fd548c5..867f5e4e7d 100644
--- a/ext/spl/spl_iterators.c
+++ b/ext/spl/spl_iterators.c
@@ -249,7 +249,7 @@ next_step:
}
}
if (retval) {
- has_children = zend_is_true(retval);
+ has_children = zend_is_true(retval TSRMLS_CC);
zval_ptr_dtor(&retval);
if (has_children) {
if (object->max_depth == -1 || object->max_depth > object->level) {
@@ -1774,7 +1774,7 @@ static inline void spl_filter_it_fetch(zval *zthis, spl_dual_it_object *intern T
while (spl_dual_it_fetch(intern, 1 TSRMLS_CC) == SUCCESS) {
zend_call_method_with_0_params(&zthis, intern->std.ce, NULL, "accept", &retval);
if (retval) {
- if (zend_is_true(retval)) {
+ if (zend_is_true(retval TSRMLS_CC)) {
zval_ptr_dtor(&retval);
return;
}
@@ -2598,7 +2598,7 @@ static inline void spl_caching_it_next(spl_dual_it_object *intern TSRMLS_DC)
return;
}
} else {
- if (zend_is_true(retval)) {
+ if (zend_is_true(retval TSRMLS_CC)) {
zend_call_method_with_0_params(&intern->inner.zobject, intern->inner.ce, NULL, "getchildren", &zchildren);
if (EG(exception)) {
if (zchildren) {
@@ -3573,7 +3573,7 @@ static int spl_iterator_func_apply(zend_object_iterator *iter, void *puser TSRML
apply_info->count++;
zend_fcall_info_call(&apply_info->fci, &apply_info->fcc, &retval, NULL TSRMLS_CC);
if (retval) {
- result = zend_is_true(retval) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_STOP;
+ result = zend_is_true(retval TSRMLS_CC) ? ZEND_HASH_APPLY_KEEP : ZEND_HASH_APPLY_STOP;
zval_ptr_dtor(&retval);
} else {
result = ZEND_HASH_APPLY_STOP;
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e84e019690..6642bc2c7b 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -4277,7 +4277,7 @@ PHP_FUNCTION(array_filter)
fci.params = args;
if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && retval) {
- int retval_true = zend_is_true(retval);
+ int retval_true = zend_is_true(retval TSRMLS_CC);
zval_ptr_dtor(&retval);
if (use_type) {
@@ -4290,7 +4290,7 @@ PHP_FUNCTION(array_filter)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "An error occurred while invoking the filter callback");
return;
}
- } else if (!zend_is_true(*operand)) {
+ } else if (!zend_is_true(*operand TSRMLS_CC)) {
continue;
}
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 4f50ce6038..6409ff37d8 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -5751,7 +5751,7 @@ PHP_FUNCTION(register_tick_function)
zend_llist_init(BG(user_tick_functions),
sizeof(user_tick_function_entry),
(llist_dtor_func_t) user_tick_function_dtor, 0);
- php_add_tick_function(run_user_tick_functions);
+ php_add_tick_function(run_user_tick_functions TSRMLS_CC);
}
for (i = 0; i < tick_fe.arg_count; i++) {
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index d6eb3b8fbc..df03772c39 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -163,7 +163,7 @@ static php_stream *php_ftp_fopen_connect(php_stream_wrapper *wrapper, const char
goto connect_errexit;
}
- php_stream_context_set(stream, context);
+ php_stream_context_set(stream, context TSRMLS_CC);
php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);
/* Start talking to ftp server */
@@ -571,7 +571,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, const char *pa
goto errexit;
}
- php_stream_context_set(datastream, context);
+ php_stream_context_set(datastream, context TSRMLS_CC);
php_stream_notify_progress_init(context, 0, file_size);
if (use_ssl_on_data && (php_stream_xport_crypto_setup(datastream,
@@ -745,7 +745,7 @@ php_stream * php_stream_ftp_opendir(php_stream_wrapper *wrapper, const char *pat
goto opendir_errexit;
}
- php_stream_context_set(datastream, context);
+ php_stream_context_set(datastream, context TSRMLS_CC);
if (use_ssl_on_data && (php_stream_xport_crypto_setup(stream,
STREAM_CRYPTO_METHOD_SSLv23_CLIENT, NULL TSRMLS_CC) < 0 ||
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 73776ff0b9..3ef722bde0 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -337,7 +337,7 @@ finish:
eol_detect = stream->flags & (PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC);
stream->flags &= ~(PHP_STREAM_FLAG_DETECT_EOL | PHP_STREAM_FLAG_EOL_MAC);
- php_stream_context_set(stream, context);
+ php_stream_context_set(stream, context TSRMLS_CC);
php_stream_notify_info(context, PHP_STREAM_NOTIFY_CONNECT, NULL, 0);
@@ -682,7 +682,7 @@ finish:
response_code = 0;
}
if (context && SUCCESS==php_stream_context_get_option(context, "http", "ignore_errors", &tmpzval)) {
- ignore_errors = zend_is_true(*tmpzval);
+ ignore_errors = zend_is_true(*tmpzval TSRMLS_CC);
}
/* when we request only the header, don't fail even on error codes */
if ((options & STREAM_ONLY_GET_HEADERS) || ignore_errors) {
diff --git a/ext/standard/type.c b/ext/standard/type.c
index dcc8083e41..15bdbb06c2 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -186,7 +186,7 @@ PHP_FUNCTION(boolval)
return;
}
- RETURN_BOOL(zend_is_true(*val));
+ RETURN_BOOL(zend_is_true(*val TSRMLS_CC));
}
/* }}} */
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index 3d63dd0642..aac93cd5c9 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -57,8 +57,8 @@ zend_module_entry xsl_module_entry = {
xsl_functions,
PHP_MINIT(xsl),
PHP_MSHUTDOWN(xsl),
- PHP_RINIT(xsl), /* Replace with NULL if there's nothing to do at request start */
- PHP_RSHUTDOWN(xsl), /* Replace with NULL if there's nothing to do at request end */
+ NULL,
+ NULL,
PHP_MINFO(xsl),
#if ZEND_MODULE_API_NO >= 20010901
"0.1", /* Replace with version number for your extension */
@@ -170,6 +170,7 @@ PHP_MINIT_FUNCTION(xsl)
xsltRegisterExtModuleFunction ((const xmlChar *) "function",
(const xmlChar *) "http://php.net/xsl",
xsl_ext_function_object_php);
+ xsltSetGenericErrorFunc(NULL, php_libxml_error_handler);
REGISTER_LONG_CONSTANT("XSL_CLONE_AUTO", 0, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER", -1, CONST_CS | CONST_PERSISTENT);
@@ -273,7 +274,7 @@ PHP_MSHUTDOWN_FUNCTION(xsl)
(const xmlChar *) "http://php.net/xsl");
xsltUnregisterExtModuleFunction ((const xmlChar *) "function",
(const xmlChar *) "http://php.net/xsl");
-
+ xsltSetGenericErrorFunc(NULL, NULL);
xsltCleanupGlobals();
UNREGISTER_INI_ENTRIES();
@@ -282,24 +283,6 @@ PHP_MSHUTDOWN_FUNCTION(xsl)
}
/* }}} */
-/* {{{ PHP_RINIT_FUNCTION
- */
-PHP_RINIT_FUNCTION(xsl)
-{
- xsltSetGenericErrorFunc(NULL, php_libxml_error_handler);
- return SUCCESS;
-}
-/* }}} */
-
-/* {{{ PHP_RSHUTDOWN_FUNCTION
- */
-PHP_RSHUTDOWN_FUNCTION(xsl)
-{
- xsltSetGenericErrorFunc(NULL, NULL);
- return SUCCESS;
-}
-/* }}} */
-
/* {{{ PHP_MINFO_FUNCTION
*/
PHP_MINFO_FUNCTION(xsl)
diff --git a/main/SAPI.c b/main/SAPI.c
index b182909c71..f9e4a9fe7f 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -999,7 +999,7 @@ SAPI_API int sapi_register_input_filter(unsigned int (*input_filter)(int arg, ch
SAPI_API int sapi_flush(TSRMLS_D)
{
if (sapi_module.flush) {
- sapi_module.flush(SG(server_context));
+ sapi_module.flush(SG(server_context) TSRMLS_CC);
return SUCCESS;
} else {
return FAILURE;
diff --git a/main/SAPI.h b/main/SAPI.h
index a2158a9590..71942f5663 100644
--- a/main/SAPI.h
+++ b/main/SAPI.h
@@ -227,7 +227,7 @@ struct _sapi_module_struct {
int (*deactivate)(TSRMLS_D);
int (*ub_write)(const char *str, unsigned int str_length TSRMLS_DC);
- void (*flush)(void *server_context);
+ void (*flush)(void *server_context TSRMLS_DC);
struct stat *(*get_stat)(TSRMLS_D);
char *(*getenv)(char *name, size_t name_len TSRMLS_DC);
diff --git a/main/main.c b/main/main.c
index 2d59c46930..ebb158ac7c 100644
--- a/main/main.c
+++ b/main/main.c
@@ -179,7 +179,7 @@ static PHP_INI_MH(OnChangeMemoryLimit)
} else {
PG(memory_limit) = 1<<30; /* effectively, no limit */
}
- return zend_set_memory_limit(PG(memory_limit));
+ return zend_set_memory_limit(PG(memory_limit) TSRMLS_CC);
}
/* }}} */
@@ -460,40 +460,6 @@ static PHP_INI_MH(OnChangeMailForceExtra)
/* defined in browscap.c */
PHP_INI_MH(OnChangeBrowscap);
-/* {{{ PHP_INI_MH
- */
-static PHP_INI_MH(OnChangeAlwaysPopulateRawPostData)
-{
- signed char *p;
-#ifndef ZTS
- char *base = (char *) mh_arg2;
-#else
- char *base;
-
- base = (char *) ts_resource(*((int *) mh_arg2));
-#endif
-
- p = (signed char *) (base+(size_t) mh_arg1);
-
- *p = zend_atol(new_value, new_value_length);
- if (new_value_length == 2 && strcasecmp("on", new_value) == 0) {
- *p = (signed char) 1;
- }
- else if (new_value_length == 3 && strcasecmp("yes", new_value) == 0) {
- *p = (signed char) 1;
- }
- else if (new_value_length == 4 && strcasecmp("true", new_value) == 0) {
- *p = (signed char) 1;
- }
- else if (new_value_length == 5 && strcasecmp("never", new_value) == 0) {
- *p = (signed char) -1;
- }
- else {
- *p = (signed char) atoi(new_value);
- }
- return SUCCESS;
-}
-/* }}} */
/* Need to be read from the environment (?):
* PHP_AUTO_PREPEND_FILE
@@ -596,7 +562,6 @@ PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("allow_url_fopen", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("allow_url_include", "0", PHP_INI_SYSTEM, OnUpdateBool, allow_url_include, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("enable_post_data_reading", "1", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, enable_post_data_reading, php_core_globals, core_globals)
- STD_PHP_INI_ENTRY("always_populate_raw_post_data", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnChangeAlwaysPopulateRawPostData, always_populate_raw_post_data, php_core_globals, core_globals)
STD_PHP_INI_ENTRY("realpath_cache_size", "16K", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_size_limit, virtual_cwd_globals, cwd_globals)
STD_PHP_INI_ENTRY("realpath_cache_ttl", "120", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_ttl, virtual_cwd_globals, cwd_globals)
@@ -1201,7 +1166,7 @@ static void php_error_cb(int type, const char *error_filename, const uint error_
CG(parse_error) = 0;
} else {
/* restore memory limit */
- zend_set_memory_limit(PG(memory_limit));
+ zend_set_memory_limit(PG(memory_limit) TSRMLS_CC);
efree(buffer);
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
zend_bailout();
@@ -1828,7 +1793,7 @@ void php_request_shutdown(void *dummy)
}
} zend_end_try();
- /* 7.5 free last error information */
+ /* 8. free last error information */
if (PG(last_error_message)) {
free(PG(last_error_message));
PG(last_error_message) = NULL;
@@ -1838,34 +1803,34 @@ void php_request_shutdown(void *dummy)
PG(last_error_file) = NULL;
}
- /* 7. Shutdown scanner/executor/compiler and restore ini entries */
+ /* 9. Shutdown scanner/executor/compiler and restore ini entries */
zend_deactivate(TSRMLS_C);
- /* 8. Call all extensions post-RSHUTDOWN functions */
+ /* 10. Call all extensions post-RSHUTDOWN functions */
zend_try {
zend_post_deactivate_modules(TSRMLS_C);
} zend_end_try();
- /* 9. SAPI related shutdown (free stuff) */
+ /* 11. SAPI related shutdown (free stuff) */
zend_try {
sapi_deactivate(TSRMLS_C);
} zend_end_try();
- /* 9.5 free virtual CWD memory */
+ /* 12. free virtual CWD memory */
virtual_cwd_deactivate(TSRMLS_C);
- /* 10. Destroy stream hashes */
+ /* 13. Destroy stream hashes */
zend_try {
php_shutdown_stream_hashes(TSRMLS_C);
} zend_end_try();
- /* 11. Free Willy (here be crashes) */
+ /* 14. Free Willy (here be crashes) */
zend_try {
shutdown_memory_manager(CG(unclean_shutdown) || !report_memleaks, 0 TSRMLS_CC);
} zend_end_try();
zend_interned_strings_restore(TSRMLS_C);
- /* 12. Reset max_execution_time */
+ /* 15. Reset max_execution_time */
zend_try {
zend_unset_timeout(TSRMLS_C);
} zend_end_try();
@@ -2678,9 +2643,9 @@ PHPAPI int php_lint_script(zend_file_handle *file TSRMLS_DC)
#ifdef PHP_WIN32
/* {{{ dummy_indent
just so that this symbol gets exported... */
-PHPAPI void dummy_indent(void)
+PHPAPI void dummy_indent(TSRMLS_D)
{
- zend_indent();
+ zend_indent(TSRMLS_C);
}
/* }}} */
#endif
diff --git a/main/php.h b/main/php.h
index 8f8ad33d87..c2d0d936ca 100644
--- a/main/php.h
+++ b/main/php.h
@@ -26,7 +26,7 @@
#include <dmalloc.h>
#endif
-#define PHP_API_VERSION 20131106
+#define PHP_API_VERSION 20131218
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
diff --git a/main/php_content_types.c b/main/php_content_types.c
index bc42c8094b..c8db921421 100644
--- a/main/php_content_types.c
+++ b/main/php_content_types.c
@@ -33,19 +33,6 @@ static sapi_post_entry php_post_entries[] = {
};
/* }}} */
-static zend_bool populate_raw_post_data(TSRMLS_D)
-{
- if (!SG(request_info).request_body) {
- return (zend_bool) 0;
- }
-
- if (!PG(always_populate_raw_post_data)) {
- return (zend_bool) !SG(request_info).post_entry;
- }
-
- return (zend_bool) (PG(always_populate_raw_post_data) > 0);
-}
-
/* {{{ SAPI_POST_READER_FUNC
*/
SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
@@ -55,23 +42,6 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
/* no post handler registered, so we just swallow the data */
sapi_read_standard_form_data(TSRMLS_C);
}
-
- if (populate_raw_post_data(TSRMLS_C)) {
- size_t length;
- char *data = NULL;
-
- php_stream_rewind(SG(request_info).request_body);
- length = php_stream_copy_to_mem(SG(request_info).request_body, &data, PHP_STREAM_COPY_ALL, 0);
- php_stream_rewind(SG(request_info).request_body);
-
- SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length);
-
- sapi_module.sapi_error(E_DEPRECATED,
- "Automatically populating $HTTP_RAW_POST_DATA is deprecated and "
- "will be removed in a future version. To avoid this warning set "
- "'always_populate_raw_post_data' to '-1' in php.ini and use the "
- "php://input stream instead.");
- }
}
}
/* }}} */
diff --git a/main/php_globals.h b/main/php_globals.h
index cf7998b83d..b8f64d6d31 100644
--- a/main/php_globals.h
+++ b/main/php_globals.h
@@ -131,7 +131,6 @@ struct _php_core_globals {
zend_bool during_request_startup;
zend_bool allow_url_fopen;
zend_bool enable_post_data_reading;
- signed char always_populate_raw_post_data;
zend_bool report_zend_debug;
int last_error_type;
diff --git a/main/php_ini.c b/main/php_ini.c
index 1faec6877d..3bcb249f84 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -361,7 +361,7 @@ static void php_load_zend_extension_cb(void *arg TSRMLS_DC)
int length = strlen(filename);
if (IS_ABSOLUTE_PATH(filename, length)) {
- zend_load_extension(filename);
+ zend_load_extension(filename TSRMLS_CC);
} else {
char *libpath;
char *extension_dir = INI_STR("extension_dir");
@@ -372,7 +372,7 @@ static void php_load_zend_extension_cb(void *arg TSRMLS_DC)
} else {
spprintf(&libpath, 0, "%s%c%s", extension_dir, DEFAULT_SLASH, filename);
}
- zend_load_extension(libpath);
+ zend_load_extension(libpath TSRMLS_CC);
efree(libpath);
}
}
diff --git a/main/php_ticks.c b/main/php_ticks.c
index b07f925fab..248b5a9e04 100644
--- a/main/php_ticks.c
+++ b/main/php_ticks.c
@@ -46,17 +46,13 @@ static int php_compare_tick_functions(void *elem1, void *elem2)
return (func1 == func2);
}
-PHPAPI void php_add_tick_function(void (*func)(int))
+PHPAPI void php_add_tick_function(void (*func)(int) TSRMLS_DC)
{
- TSRMLS_FETCH();
-
zend_llist_add_element(&PG(tick_functions), (void *)&func);
}
-PHPAPI void php_remove_tick_function(void (*func)(int))
+PHPAPI void php_remove_tick_function(void (*func)(int) TSRMLS_DC)
{
- TSRMLS_FETCH();
-
zend_llist_del_element(&PG(tick_functions), (void *)func,
(int(*)(void*, void*))php_compare_tick_functions);
}
@@ -69,10 +65,8 @@ static void php_tick_iterator(void *data, void *arg TSRMLS_DC)
func(*((int *)arg));
}
-void php_run_ticks(int count)
+void php_run_ticks(int count TSRMLS_DC)
{
- TSRMLS_FETCH();
-
zend_llist_apply_with_argument(&PG(tick_functions), (llist_apply_with_arg_func_t) php_tick_iterator, &count TSRMLS_CC);
}
diff --git a/main/php_ticks.h b/main/php_ticks.h
index 0f58adac6a..b511949d80 100644
--- a/main/php_ticks.h
+++ b/main/php_ticks.h
@@ -24,11 +24,11 @@
int php_startup_ticks(TSRMLS_D);
void php_deactivate_ticks(TSRMLS_D);
void php_shutdown_ticks(TSRMLS_D);
-void php_run_ticks(int count);
+void php_run_ticks(int count TSRMLS_DC);
BEGIN_EXTERN_C()
-PHPAPI void php_add_tick_function(void (*func)(int));
-PHPAPI void php_remove_tick_function(void (*func)(int));
+PHPAPI void php_add_tick_function(void (*func)(int) TSRMLS_DC);
+PHPAPI void php_remove_tick_function(void (*func)(int) TSRMLS_DC);
END_EXTERN_C()
#endif
diff --git a/main/php_variables.c b/main/php_variables.c
index f529898bf0..38cf043839 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -734,6 +734,7 @@ static zend_bool php_auto_globals_create_post(const char *name, uint name_len TS
if (PG(variables_order) &&
(strchr(PG(variables_order),'P') || strchr(PG(variables_order),'p')) &&
+ !SG(headers_sent) &&
SG(request_info).request_method &&
!strcasecmp(SG(request_info).request_method, "POST")) {
sapi_module.treat_data(PARSE_POST, NULL, NULL TSRMLS_CC);
diff --git a/main/php_version.h b/main/php_version.h
index d48bf13c6f..87c2e4ac4d 100644
--- a/main/php_version.h
+++ b/main/php_version.h
@@ -1,8 +1,8 @@
/* automatically generated by configure */
/* edit configure.in to change version number */
#define PHP_MAJOR_VERSION 5
-#define PHP_MINOR_VERSION 6
+#define PHP_MINOR_VERSION 7
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
-#define PHP_VERSION "5.6.0-dev"
-#define PHP_VERSION_ID 50600
+#define PHP_VERSION "5.7.0-dev"
+#define PHP_VERSION_ID 50700
diff --git a/main/streams/php_stream_context.h b/main/streams/php_stream_context.h
index 58b298b689..5c6925a856 100644
--- a/main/streams/php_stream_context.h
+++ b/main/streams/php_stream_context.h
@@ -87,7 +87,7 @@ END_EXTERN_C()
BEGIN_EXTERN_C()
PHPAPI void php_stream_notification_notify(php_stream_context *context, int notifycode, int severity,
char *xmsg, int xcode, size_t bytes_sofar, size_t bytes_max, void * ptr TSRMLS_DC);
-PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context);
+PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC);
END_EXTERN_C()
#define php_stream_notify_info(context, code, xmsg, xcode) do { if ((context) && (context)->notifier) { \
diff --git a/main/streams/streams.c b/main/streams/streams.c
index 4713db151b..4c4764c1ea 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -2148,10 +2148,9 @@ PHPAPI php_stream *_php_stream_open_wrapper_ex(const char *path, const char *mod
/* }}} */
/* {{{ context API */
-PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context)
+PHPAPI php_stream_context *php_stream_context_set(php_stream *stream, php_stream_context *context TSRMLS_DC)
{
php_stream_context *oldcontext = stream->context;
- TSRMLS_FETCH();
stream->context = context;
diff --git a/main/streams/transports.c b/main/streams/transports.c
index a633b059fa..f54e8e6cdf 100644
--- a/main/streams/transports.c
+++ b/main/streams/transports.c
@@ -134,7 +134,7 @@ PHPAPI php_stream *_php_stream_xport_create(const char *name, size_t namelen, in
context STREAMS_REL_CC TSRMLS_CC);
if (stream) {
- php_stream_context_set(stream, context);
+ php_stream_context_set(stream, context TSRMLS_CC);
if ((flags & STREAM_XPORT_SERVER) == 0) {
/* client */
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index 5990464a6e..7d958729e5 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -1121,7 +1121,7 @@ static int php_userstreamop_set_option(php_stream *stream, int option, int value
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_SET_OPTION " is not implemented!",
us->wrapper->classname);
ret = PHP_STREAM_OPTION_RETURN_ERR;
- } else if (retval && zend_is_true(retval)) {
+ } else if (retval && zend_is_true(retval TSRMLS_CC)) {
ret = PHP_STREAM_OPTION_RETURN_OK;
} else {
ret = PHP_STREAM_OPTION_RETURN_ERR;
@@ -1629,7 +1629,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr T
us->wrapper->classname);
break;
}
- if (retval == NULL || !zend_is_true(retval)) {
+ if (retval == NULL || !zend_is_true(retval TSRMLS_CC)) {
break;
}
php_stream_from_zval_no_verify(intstream, &retval);
diff --git a/php.ini-development b/php.ini-development
index 0ca81e8ffe..137574bdee 100644
--- a/php.ini-development
+++ b/php.ini-development
@@ -682,13 +682,6 @@ default_mimetype = "text/html"
; http://php.net/default-charset
;default_charset = "UTF-8"
-; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
-; to disable this feature and it will be removed in a future version.
-; If post reading is disabled through enable_post_data_reading,
-; $HTTP_RAW_POST_DATA is *NOT* populated.
-; http://php.net/always-populate-raw-post-data
-;always_populate_raw_post_data = -1
-
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/php.ini-production b/php.ini-production
index 3b6f5e3cf8..3fa1788a00 100644
--- a/php.ini-production
+++ b/php.ini-production
@@ -682,13 +682,6 @@ default_mimetype = "text/html"
; http://php.net/default-charset
;default_charset = "UTF-8"
-; Always populate the $HTTP_RAW_POST_DATA variable. PHP's default behavior is
-; to disable this feature and it will be removed in a future version.
-; If post reading is disabled through enable_post_data_reading,
-; $HTTP_RAW_POST_DATA is *NOT* populated.
-; http://php.net/always-populate-raw-post-data
-;always_populate_raw_post_data = -1
-
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index a1e5a70e89..37252e1126 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -108,7 +108,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_apache_flush
*/
-static void sapi_apache_flush(void *server_context)
+static void sapi_apache_flush(void *server_context TSRMLS_DC)
{
if (server_context) {
#if MODULE_MAGIC_NUMBER > 19970110
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index da920f818c..6b56e78545 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -245,14 +245,13 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
}
static void
-php_apache_sapi_flush(void *server_context)
+php_apache_sapi_flush(void *server_context TSRMLS_DC)
{
php_struct *ctx;
apr_bucket_brigade *bb;
apr_bucket_alloc_t *ba;
apr_bucket *b;
ap_filter_t *f; /* output filters */
- TSRMLS_FETCH();
ctx = server_context;
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index d2b3a327ff..37d862f889 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -287,11 +287,10 @@ php_apache_sapi_register_variables(zval *track_vars_array TSRMLS_DC)
}
static void
-php_apache_sapi_flush(void *server_context)
+php_apache_sapi_flush(void *server_context TSRMLS_DC)
{
php_struct *ctx;
request_rec *r;
- TSRMLS_FETCH();
ctx = server_context;
diff --git a/sapi/apache_hooks/mod_php5.c b/sapi/apache_hooks/mod_php5.c
index a069e324c1..901d3b57a3 100644
--- a/sapi/apache_hooks/mod_php5.c
+++ b/sapi/apache_hooks/mod_php5.c
@@ -253,7 +253,7 @@ static int sapi_apache_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_apache_flush
*/
-static void sapi_apache_flush(void *server_context)
+static void sapi_apache_flush(void *server_context TSRMLS_DC)
{
if (server_context) {
#if MODULE_MAGIC_NUMBER > 19970110
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index 6531ca20ee..76a4219b0a 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -155,15 +155,13 @@ static request_rec *get_apache_request(zval *z TSRMLS_DC)
return r;
}
-/* {{{ php_apache_request_new(request_rec *r)
+/* {{{ php_apache_request_new(request_rec *r TSRMLS_DC)
* create a new zval-instance for ApacheRequest that wraps request_rec
*/
-zval *php_apache_request_new(request_rec *r)
+zval *php_apache_request_new(request_rec *r TSRMLS_DC)
{
zval *req;
zval *addr;
-
- TSRMLS_FETCH();
MAKE_STD_ZVAL(addr);
Z_TYPE_P(addr) = IS_LONG;
@@ -1170,7 +1168,7 @@ PHP_FUNCTION(apache_request_sub_req_lookup_uri)
if (!sub_r) {
RETURN_FALSE;
}
- return_value = php_apache_request_new(sub_r);
+ return_value = php_apache_request_new(sub_r TSRMLS_CC);
}
/* }}} */
@@ -1196,7 +1194,7 @@ PHP_FUNCTION(apache_request_sub_req_lookup_file)
if (!sub_r) {
RETURN_FALSE;
}
- return_value = php_apache_request_new(sub_r);
+ return_value = php_apache_request_new(sub_r TSRMLS_CC);
}
/* }}} */
@@ -1222,7 +1220,7 @@ PHP_FUNCTION(apache_request_sub_req_method_uri)
if (!sub_r) {
RETURN_FALSE;
}
- return_value = php_apache_request_new(sub_r);
+ return_value = php_apache_request_new(sub_r TSRMLS_CC);
}
/* }}} */
diff --git a/sapi/caudium/caudium.c b/sapi/caudium/caudium.c
index e707f3576e..946f7a039e 100644
--- a/sapi/caudium/caudium.c
+++ b/sapi/caudium/caudium.c
@@ -395,11 +395,10 @@ php_caudium_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
* the client. Used for POST/PUT requests.
*/
-INLINE static int php_caudium_low_read_post(char *buf, uint count_bytes)
+INLINE static int php_caudium_low_read_post(char *buf, uint count_bytes TSRMLS_DC)
{
uint total_read = 0;
GET_THIS();
- TSRMLS_FETCH();
if(!MY_FD_OBJ->prog)
{
@@ -423,7 +422,7 @@ static int
php_caudium_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC)
{
uint total_read = 0;
- THREAD_SAFE_RUN(total_read = php_caudium_low_read_post(buf, count_bytes), "read post");
+ THREAD_SAFE_RUN(total_read = php_caudium_low_read_post(buf, count_bytes TSRMLS_CC), "read post");
return total_read;
}
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index f464e1e92a..5b22fa580f 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -324,14 +324,14 @@ static int sapi_fcgi_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void sapi_cgi_flush(void *server_context)
+static void sapi_cgi_flush(void *server_context TSRMLS_DC)
{
if (fflush(stdout) == EOF) {
php_handle_aborted_connection();
}
}
-static void sapi_fcgi_flush(void *server_context)
+static void sapi_fcgi_flush(void *server_context TSRMLS_DC)
{
fcgi_request *request = (fcgi_request*) server_context;
@@ -928,7 +928,7 @@ static int sapi_cgi_deactivate(TSRMLS_D)
php_handle_aborted_connection();
}
} else {
- sapi_cgi_flush(SG(server_context));
+ sapi_cgi_flush(SG(server_context) TSRMLS_CC);
}
}
return SUCCESS;
@@ -2240,7 +2240,7 @@ consult the installation file that came with this distribution, or visit \n\
break;
case 'z': /* load extension file */
- zend_load_extension(php_optarg);
+ zend_load_extension(php_optarg TSRMLS_CC);
break;
default:
@@ -2493,7 +2493,7 @@ consult the installation file that came with this distribution, or visit \n\
/* Zeev might want to do something with this one day */
case PHP_MODE_INDENT:
open_file_for_scanning(&file_handle TSRMLS_CC);
- zend_indent();
+ zend_indent(TSRMLS_C);
zend_file_handle_dtor(&file_handle TSRMLS_CC);
php_output_teardown();
return SUCCESS;
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 9daa382eec..7c971176b6 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -320,7 +320,7 @@ static int sapi_cli_ub_write(const char *str, uint str_length TSRMLS_DC) /* {{{
}
/* }}} */
-static void sapi_cli_flush(void *server_context) /* {{{ */
+static void sapi_cli_flush(void *server_context TSRMLS_DC) /* {{{ */
{
/* Ignore EBADF here, it's caused by the fact that STDIN/STDOUT/STDERR streams
* are/could be closed before fflush() is called.
@@ -870,7 +870,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
break;
case 'z': /* load extension file */
- zend_load_extension(php_optarg);
+ zend_load_extension(php_optarg TSRMLS_CC);
break;
case 'H':
hide_argv = 1;
@@ -1024,7 +1024,7 @@ static int do_cli(int argc, char **argv TSRMLS_DC) /* {{{ */
/* Zeev might want to do something with this one day */
case PHP_MODE_INDENT:
open_file_for_scanning(&file_handle TSRMLS_CC);
- zend_indent();
+ zend_indent(TSRMLS_C);
zend_file_handle_dtor(file_handle.handle TSRMLS_CC);
goto out;
break;
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 3f2aaf0088..2c68fa17a4 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -614,10 +614,9 @@ static int sapi_cli_server_ub_write(const char *str, uint str_length TSRMLS_DC)
return php_cli_server_client_send_through(client, str, str_length);
} /* }}} */
-static void sapi_cli_server_flush(void *server_context) /* {{{ */
+static void sapi_cli_server_flush(void *server_context TSRMLS_DC) /* {{{ */
{
php_cli_server_client *client = server_context;
- TSRMLS_FETCH();
if (!client) {
return;
@@ -1144,7 +1143,7 @@ static int php_cli_server_content_sender_send(php_cli_server_content_sender *sen
return 0;
} /* }}} */
-static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sender, int fd, size_t *nbytes_read) /* {{{ */
+static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sender, int fd, size_t *nbytes_read TSRMLS_DC) /* {{{ */
{
ssize_t _nbytes_read;
php_cli_server_chunk *chunk = php_cli_server_chunk_heap_new_self_contained(131072);
@@ -1152,7 +1151,6 @@ static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sen
_nbytes_read = read(fd, chunk->data.heap.p, chunk->data.heap.len);
if (_nbytes_read < 0) {
char *errstr = get_last_error();
- TSRMLS_FETCH();
php_cli_server_logf("%s" TSRMLS_CC, errstr);
pefree(errstr, 1);
php_cli_server_chunk_dtor(chunk);
@@ -2368,7 +2366,7 @@ static int php_cli_server_send_event(php_cli_server *server, php_cli_server_clie
if (client->content_sender_initialized) {
if (client->file_fd >= 0 && !client->content_sender.buffer.first) {
size_t nbytes_read;
- if (php_cli_server_content_sender_pull(&client->content_sender, client->file_fd, &nbytes_read)) {
+ if (php_cli_server_content_sender_pull(&client->content_sender, client->file_fd, &nbytes_read TSRMLS_CC)) {
php_cli_server_close_connection(server, client TSRMLS_CC);
return FAILURE;
}
diff --git a/sapi/continuity/capi.c b/sapi/continuity/capi.c
index 953991474d..87fd9328f2 100644
--- a/sapi/continuity/capi.c
+++ b/sapi/continuity/capi.c
@@ -462,7 +462,7 @@ int phpFinit(lstTset * opt)
core_globals = ts_resource(core_globals_id);
logFmsg(0, "mod/php: PHP Interface v3 (module)");
- logFmsg(0, "mod/php: Copyright (c) 1999-2005 The PHP Group. All rights reserved.");
+ logFmsg(0, "mod/php: Copyright (c) 1999-2013 The PHP Group. All rights reserved.");
sapi_startup(&capi_sapi_module);
capi_sapi_module.startup(&capi_sapi_module);
diff --git a/sapi/embed/php_embed.c b/sapi/embed/php_embed.c
index dad54de1ae..b4fc5aaf10 100644
--- a/sapi/embed/php_embed.c
+++ b/sapi/embed/php_embed.c
@@ -79,7 +79,7 @@ static int php_embed_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void php_embed_flush(void *server_context)
+static void php_embed_flush(void *server_context TSRMLS_DC)
{
if (fflush(stdout)==EOF) {
php_handle_aborted_connection();
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 93090832f5..807ea8bb5d 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -316,7 +316,7 @@ static int sapi_cgibin_ub_write(const char *str, uint str_length TSRMLS_DC)
}
-static void sapi_cgibin_flush(void *server_context)
+static void sapi_cgibin_flush(void *server_context TSRMLS_DC)
{
/* fpm has started, let use fcgi instead of stdout */
if (fpm_is_running) {
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 33ebb988a6..850433d29c 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: lsapi_main.c,v 1.57 2013/08/23 14:50:25 gwang Exp $ */
+/* $Id: lsapi_main.c,v 1.59 2013/11/18 21:14:38 gwang Exp $ */
#include "php.h"
#include "SAPI.h"
@@ -157,7 +157,7 @@ static int sapi_lsapi_ub_write(const char *str, uint str_length TSRMLS_DC)
/* {{{ sapi_lsapi_flush
*/
-static void sapi_lsapi_flush( void * server_context )
+static void sapi_lsapi_flush( void * server_context TSRMLS_DC )
{
if ( lsapi_mode ) {
if ( LSAPI_Flush() == -1) {
@@ -372,7 +372,7 @@ static void sapi_lsapi_log_message(char *message TSRMLS_DC)
static sapi_module_struct lsapi_sapi_module =
{
"litespeed",
- "LiteSpeed V6.4",
+ "LiteSpeed V6.6",
php_lsapi_startup, /* startup */
php_module_shutdown_wrapper, /* shutdown */
diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c
index 4a9affc60f..cdd60763db 100644
--- a/sapi/litespeed/lsapilib.c
+++ b/sapi/litespeed/lsapilib.c
@@ -1211,6 +1211,7 @@ int LSAPI_IsRunning(void)
int LSAPI_InitRequest( LSAPI_Request * pReq, int fd )
{
+ int newfd;
if ( !pReq )
return -1;
memset( pReq, 0, sizeof( LSAPI_Request ) );
@@ -1224,7 +1225,14 @@ int LSAPI_InitRequest( LSAPI_Request * pReq, int fd )
pReq->m_respPktHeaderEnd = &pReq->m_respPktHeader[5];
if ( allocateRespHeaderBuf( pReq, LSAPI_INIT_RESP_HEADER_LEN ) == -1 )
return -1;
-
+
+ if ( fd == STDIN_FILENO )
+ {
+ fd = dup( fd );
+ newfd = open( "/dev/null", O_RDWR );
+ dup2( newfd, STDIN_FILENO );
+ }
+
if ( isPipe( fd ) )
{
pReq->m_fdListen = -1;
@@ -2386,6 +2394,8 @@ typedef struct _lsapi_prefork_server
int m_iAvoidFork;
lsapi_child_status * m_pChildrenStatus;
+ lsapi_child_status * m_pChildrenStatusCur;
+ lsapi_child_status * m_pChildrenStatusEnd;
}lsapi_prefork_server;
@@ -2474,11 +2484,15 @@ static void lsapi_cleanup(int signal)
static lsapi_child_status * find_child_status( int pid )
{
lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
- lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatus + g_prefork_server->m_iMaxChildren * 2;
+ lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusEnd;
while( pStatus < pEnd )
{
if ( pStatus->m_pid == pid )
+ {
+ if ( pStatus + 1 > g_prefork_server->m_pChildrenStatusCur )
+ g_prefork_server->m_pChildrenStatusCur = pStatus + 1;
return pStatus;
+ }
++pStatus;
}
return NULL;
@@ -2513,8 +2527,12 @@ static void lsapi_sigchild( int signal )
{
child_status->m_pid = 0;
--g_prefork_server->m_iCurChildren;
+
}
}
+ while(( g_prefork_server->m_pChildrenStatusCur > g_prefork_server->m_pChildrenStatus )
+ &&( g_prefork_server->m_pChildrenStatusCur[-1].m_pid == 0 ))
+ --g_prefork_server->m_pChildrenStatusCur;
}
@@ -2523,7 +2541,7 @@ static int lsapi_init_children_status()
int size = 4096;
char * pBuf;
- size = g_prefork_server->m_iMaxChildren * sizeof( lsapi_child_status ) * 2;
+ size = (g_prefork_server->m_iMaxChildren + g_prefork_server->m_iExtraChildren ) * sizeof( lsapi_child_status ) * 2;
size = (size + 4095 ) / 4096 * 4096;
pBuf =( char*) mmap( NULL, size, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_SHARED, -1, 0 );
@@ -2533,7 +2551,9 @@ static int lsapi_init_children_status()
return -1;
}
memset( pBuf, 0, size );
- g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf;
+ g_prefork_server->m_pChildrenStatus = (lsapi_child_status *)pBuf;
+ g_prefork_server->m_pChildrenStatusCur = (lsapi_child_status *)pBuf;
+ g_prefork_server->m_pChildrenStatusEnd = (lsapi_child_status *)pBuf + size / sizeof( lsapi_child_status );
return 0;
}
@@ -2563,7 +2583,7 @@ static void lsapi_check_child_status( long tmCur )
int dying = 0;
int count = 0;
lsapi_child_status * pStatus = g_prefork_server->m_pChildrenStatus;
- lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatus + g_prefork_server->m_iMaxChildren * 2;
+ lsapi_child_status * pEnd = g_prefork_server->m_pChildrenStatusCur;
while( pStatus < pEnd )
{
tobekilled = 0;
@@ -2576,13 +2596,15 @@ static void lsapi_check_child_status( long tmCur )
if (( g_prefork_server->m_iCurChildren - dying > g_prefork_server->m_iMaxChildren)||
( idle > g_prefork_server->m_iMaxIdleChildren ))
{
- tobekilled = SIGUSR1;
+ ++pStatus->m_iKillSent;
+ //tobekilled = SIGUSR1;
}
else
{
if (( s_max_idle_secs> 0)&&(tmCur - pStatus->m_tmWaitBegin > s_max_idle_secs + 5 ))
{
- tobekilled = SIGUSR1;
+ ++pStatus->m_iKillSent;
+ //tobekilled = SIGUSR1;
}
}
if ( !tobekilled )
@@ -2716,6 +2738,8 @@ static int lsapi_prefork_server_accept( lsapi_prefork_server * pServer, LSAPI_Re
if ( pServer->m_iCurChildren >= (pServer->m_iMaxChildren + pServer->m_iExtraChildren ) )
{
+ fprintf( stderr, "Reached max children process limit: %d, extra: %d, current: %d, please increase LSAPI_CHILDREN.\n",
+ pServer->m_iMaxChildren, pServer->m_iExtraChildren, pServer->m_iCurChildren );
usleep( 100000 );
continue;
}
@@ -2876,7 +2900,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
{
if ( !g_running )
return -1;
- if (( s_pChildStatus )&&( s_pChildStatus->m_iKillSent ))
+ if ((s_req_processed)&&( s_pChildStatus )&&( s_pChildStatus->m_iKillSent ))
return -1;
FD_ZERO( &readfds );
FD_SET( fd, &readfds );
@@ -2904,7 +2928,7 @@ int LSAPI_Prefork_Accept_r( LSAPI_Request * pReq )
}
else if ( ret >= 1 )
{
- if (( s_pChildStatus )&&( s_pChildStatus->m_iKillSent ))
+ if (s_req_processed && ( s_pChildStatus )&&( s_pChildStatus->m_iKillSent ))
return -1;
if ( fd == pReq->m_fdListen )
{
@@ -3066,6 +3090,8 @@ static int lsapi_initSuEXEC()
{
if ( g_prefork_server->m_iMaxChildren < 100 )
g_prefork_server->m_iMaxChildren = 100;
+ if ( g_prefork_server->m_iExtraChildren < 1000 )
+ g_prefork_server->m_iExtraChildren = 1000;
}
}
if ( !s_defaultUid || !s_defaultGid )
diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c
index 432fd806c2..e0b2d0a0af 100644
--- a/sapi/milter/php_milter.c
+++ b/sapi/milter/php_milter.c
@@ -860,10 +860,6 @@ static int sapi_milter_ub_write(const char *str, uint str_length TSRMLS_DC)
return str_length;
}
-static void sapi_milter_flush(void *server_context)
-{
-}
-
static void sapi_milter_register_variables(zval *track_vars_array TSRMLS_DC)
{
php_register_variable ("SERVER_SOFTWARE", "Sendmail Milter", track_vars_array TSRMLS_CC);
@@ -906,7 +902,7 @@ static sapi_module_struct milter_sapi_module = {
NULL, /* deactivate */
sapi_milter_ub_write, /* unbuffered write */
- sapi_milter_flush, /* flush */
+ NULL, /* flush */
NULL, /* get uid */
NULL, /* getenv */
@@ -1119,7 +1115,7 @@ int main(int argc, char *argv[])
break;
case 'z': /* load extension file */
- zend_load_extension(ap_php_optarg);
+ zend_load_extension(ap_php_optarg TSRMLS_CC);
break;
default:
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index ec3137ca51..5ed133c18d 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -467,10 +467,9 @@ static int sapi_nsapi_ub_write(const char *str, unsigned int str_length TSRMLS_D
}
/* modified version of apache2 */
-static void sapi_nsapi_flush(void *server_context)
+static void sapi_nsapi_flush(void *server_context TSRMLS_DC)
{
nsapi_request_context *rc = (nsapi_request_context *)server_context;
- TSRMLS_FETCH();
if (!rc) {
/* we have no context, so no flushing needed. This fixes a SIGSEGV on shutdown */
diff --git a/sapi/pi3web/pi3web_sapi.c b/sapi/pi3web/pi3web_sapi.c
index 4bc08e5382..0e17c0e029 100644
--- a/sapi/pi3web/pi3web_sapi.c
+++ b/sapi/pi3web/pi3web_sapi.c
@@ -385,7 +385,7 @@ MODULE_API DWORD PHP5_wrapper(LPCONTROL_BLOCK lpCB)
}
if ( open_file_for_scanning( &file_handle TSRMLS_CC ) == SUCCESS )
{
- zend_indent();
+ zend_indent(TSRMLS_C);
}
else
{
diff --git a/sapi/roxen/roxen.c b/sapi/roxen/roxen.c
index b3a64345ea..14456477b0 100644
--- a/sapi/roxen/roxen.c
+++ b/sapi/roxen/roxen.c
@@ -387,13 +387,12 @@ php_roxen_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
* the client. Used for POST/PUT requests.
*/
-INLINE static int php_roxen_low_read_post(char *buf, uint count_bytes)
+INLINE static int php_roxen_low_read_post(char *buf, uint count_bytes TSRMLS_DC)
{
uint total_read = 0;
#ifdef ROXEN_USE_ZTS
GET_THIS();
#endif
- TSRMLS_FETCH();
if(!MY_FD_OBJ->prog)
{
@@ -417,7 +416,7 @@ static int
php_roxen_sapi_read_post(char *buf, uint count_bytes TSRMLS_DC)
{
uint total_read = 0;
- THREAD_SAFE_RUN(total_read = php_roxen_low_read_post(buf, count_bytes), "read post");
+ THREAD_SAFE_RUN(total_read = php_roxen_low_read_post(buf, count_bytes TSRMLS_CC), "read post");
return total_read;
}
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c
index 843e4a62fb..f6ba8585b9 100644
--- a/sapi/thttpd/thttpd.c
+++ b/sapi/thttpd/thttpd.c
@@ -349,11 +349,12 @@ static zend_module_entry php_thttpd_module = {
STANDARD_MODULE_PROPERTIES
};
-static int php_thttpd_startup(sapi_module_struct *sapi_module)
+static int php_thttpd_startup(sapi_module_struct *sapi_module TSRMLS_DC)
{
#if PHP_API_VERSION >= 20020918
if (php_module_startup(sapi_module, &php_thttpd_module, 1) == FAILURE) {
#else
+ /* No TSRMLS_CC here to zend_startup_module() as 5.6 and older does not have that parameter */
if (php_module_startup(sapi_module) == FAILURE
|| zend_startup_module(&php_thttpd_module) == FAILURE) {
#endif
diff --git a/sapi/tux/php_tux.c b/sapi/tux/php_tux.c
index 55d911f8ab..9dba8efbfe 100644
--- a/sapi/tux/php_tux.c
+++ b/sapi/tux/php_tux.c
@@ -96,7 +96,7 @@ static int sapi_tux_ub_write(const char *str, uint str_length TSRMLS_DC)
return n;
}
-static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers)
+static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
{
char buf[1024];
struct iovec *vec;
@@ -107,7 +107,6 @@ static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers)
size_t len;
char *status_line;
int locate_cl;
- TSRMLS_FETCH();
max_headers = 30;
n = 1;
@@ -158,11 +157,10 @@ static int sapi_tux_send_headers(sapi_headers_struct *sapi_headers)
return SAPI_HEADER_SENT_SUCCESSFULLY;
}
-static int sapi_tux_read_post(char *buffer, uint count_bytes)
+static int sapi_tux_read_post(char *buffer, uint count_bytes TSRMLS_DC)
{
#if 0
int amount = 0;
- TSRMLS_FETCH();
TG(req)->objectlen = count_bytes;
TG(req)->object_addr = buffer;
@@ -177,10 +175,8 @@ static int sapi_tux_read_post(char *buffer, uint count_bytes)
#endif
}
-static char *sapi_tux_read_cookies(void)
+static char *sapi_tux_read_cookies(TSRMLS_D)
{
- TSRMLS_FETCH();
-
return TG(req)->cookies;
}
diff --git a/tests/basic/024.phpt b/tests/basic/024.phpt
deleted file mode 100644
index 2e046c0cd8..0000000000
--- a/tests/basic/024.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test HTTP_RAW_POST_DATA creation
---INI--
-always_populate_raw_post_data=1
-max_input_vars=1000
---POST--
-a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3
---FILE--
-<?php
-var_dump($_POST, $HTTP_RAW_POST_DATA);
-?>
---EXPECT--
-Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
-
-Warning: Cannot modify header information - headers already sent in Unknown on line 0
-array(3) {
- ["a"]=>
- string(3) "ABC"
- ["y"]=>
- string(3) "XYZ"
- ["c"]=>
- array(3) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- ["a"]=>
- string(1) "3"
- }
-}
-string(30) "a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3"
diff --git a/tests/basic/024_1.phpt b/tests/basic/024_1.phpt
deleted file mode 100644
index f98af82995..0000000000
--- a/tests/basic/024_1.phpt
+++ /dev/null
@@ -1,29 +0,0 @@
---TEST--
-Test HTTP_RAW_POST_DATA creation
---INI--
-always_populate_raw_post_data=-1
-max_input_vars=1000
---POST--
-a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3
---FILE--
-<?php
-var_dump($_POST, $HTTP_RAW_POST_DATA);
-?>
---EXPECTF--
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
-array(3) {
- ["a"]=>
- string(3) "ABC"
- ["y"]=>
- string(3) "XYZ"
- ["c"]=>
- array(3) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- ["a"]=>
- string(1) "3"
- }
-}
-NULL
diff --git a/tests/basic/026.phpt b/tests/basic/026.phpt
deleted file mode 100644
index a3e34f49f2..0000000000
--- a/tests/basic/026.phpt
+++ /dev/null
@@ -1,18 +0,0 @@
---TEST--
-Registration of HTTP_RAW_POST_DATA due to unknown content-type
---INI--
-always_populate_raw_post_data=0
---POST_RAW--
-Content-Type: unknown/type
-a=1&b=ZYX
---FILE--
-<?php
-var_dump($_POST, $HTTP_RAW_POST_DATA);
-?>
---EXPECT--
-Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
-
-Warning: Cannot modify header information - headers already sent in Unknown on line 0
-array(0) {
-}
-string(9) "a=1&b=ZYX"
diff --git a/tests/basic/026_1.phpt b/tests/basic/026_1.phpt
deleted file mode 100644
index 527a795f67..0000000000
--- a/tests/basic/026_1.phpt
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Registration of HTTP_RAW_POST_DATA due to unknown content-type
---INI--
-always_populate_raw_post_data=-1
---POST_RAW--
-Content-Type: unknown/type
-a=1&b=ZYX
---FILE--
-<?php
-var_dump($_POST, $HTTP_RAW_POST_DATA);
-?>
---EXPECTF--
-Notice: Undefined variable: HTTP_RAW_POST_DATA in %s on line %d
-array(0) {
-}
-NULL