Nikita Popov
dd86987b2c
Replay warnings during inheritance ( #6928 )
...
Since 3e6b447979 it is again possible to have
warnings (deprecations) during inheritance, and more such functionality is
likely in the future. This is a problem, because such warnings will only be
shown on the first request if the opcache inheritance cache is used. This
currently causes test failures in --repeat builds.
Fix this by uplifting the error recording functionality from opcache to Zend,
and then using it to persist a warning trace in the inheritance cache, which
can then be used to replay the warnings on subsequent executions.
2021-04-29 16:37:53 +02:00
Matteo Beccati
f84936b30c
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:06:11 +02:00
Matteo Beccati
7bc9df4af2
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
2021-04-29 12:05:49 +02:00
Matteo Beccati
b8e49fe872
Revert "Fix #80892 : PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
...
This reverts commit 340a06778c .
2021-04-29 11:59:16 +02:00
Nikita Popov
e8e7c04a3a
Use common struct to store error information
...
This is needed by both fibers and opcache (and GH-6903 also uses it),
so make it a common structure that can be used by any functionality
storing warnings/errors.
2021-04-29 11:50:54 +02:00
Nikita Popov
9a1da9f61f
Don't use separate static variables in inherited methods
...
RFC: https://wiki.php.net/rfc/static_variable_inheritance
Closes GH-6719.
2021-04-28 17:08:50 +02:00
Nikita Popov
3e6b447979
Partially deprecate Serializable
...
If Serializable is implemented, require that __serialize() and
__unserialize() are implemented as well, else issue a deprecation
warning.
Also deprecate use of PDO::FETCH_SERIALIZE.
RFC: https://wiki.php.net/rfc/phase_out_serializable
Closes GH-6494.
2021-04-28 16:55:14 +02:00
Nikita Popov
5295e368b4
Filter return value of ReflectionClassConstant::getModifiers()
...
Don't return internal flags like IS_CASE.
2021-04-28 14:55:37 +02:00
Nikita Popov
fd1d5ec2b4
Add ZEND_CLASS_CONST_FLAGS() macro
...
And drop Z_ACCESS_FLAGS(). We no longer store *only* access flags
in these.
2021-04-28 14:51:54 +02:00
Nikita Popov
2ceef24f4a
Remove incorrect func info for array_reduce() and pos()
...
These are both clearly not rc1 functions. As they are otherwise
UNKNOWN_INFO, I'm just dropping them entirely.
2021-04-28 11:41:21 +02:00
Nikita Popov
028dd891f9
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
filter_var_array() may return array_of_ref
2021-04-28 11:27:55 +02:00
Nikita Popov
5acab7ebb4
filter_var_array() may return array_of_ref
...
This function preserves references in the input array.
2021-04-28 11:27:14 +02:00
Nikita Popov
220ffb90d0
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
fetch_assoc may return array_key_long
2021-04-28 11:20:38 +02:00
Nikita Popov
67c4d1f5b9
fetch_assoc may return array_key_long
...
If the column name is a number (which is possible at least via
AS clauses), then symtable canonicalization will convert it into
an integer key.
2021-04-28 11:18:36 +02:00
Nikita Popov
e8ef923dd6
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove assert_options() return value info
2021-04-28 11:06:54 +02:00
Nikita Popov
76d1120a48
Remove assert_options() return value info
...
The ASSERT_CALLBACK value is not validated at all -- it's possible
to set it to an arbitrary value. As such, the function can also
return any value or type (even without outright abuse, the opcache
func info was wrong in that the return can be rcn, and the array
can be array_of_ref).
2021-04-28 11:05:05 +02:00
Nikita Popov
af9fadc55a
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
password_get_info() may return array_of_null
2021-04-28 10:55:43 +02:00
Nikita Popov
c340f97ab0
password_get_info() may return array_of_null
...
The algo key is set to null if the algorithm can't be detected.
2021-04-28 10:54:31 +02:00
Nikita Popov
4a5bda6a8d
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
getdate() may return array_key_long
2021-04-28 10:47:45 +02:00
Nikita Popov
c7387ab92f
getdate() may return array_key_long
...
This function mostly uses string keys, but the timestamp is
returned at key 0 (why???)
2021-04-28 10:46:37 +02:00
Nikita Popov
98a071e880
pg_connect() may return rcn
...
Without CONNECT_FORCE_NEW, pg_connect() may resuse an existing
connection and refcount may be larger than one.
2021-04-28 10:36:48 +02:00
Nikita Popov
331eddadc8
Make date/time type arguments of IntlDateFormatter ctor optional
...
Default them to IntlDateFormatter:FULL, which has value 0, which
was what you would get if you passed null to these arguments in
weak typing mode. The documentation called this ICU's default
date/time type.
2021-04-27 23:58:38 +02:00
Nikita Popov
bd2c743f1d
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Remove incorrect format argument
2021-04-27 22:23:22 +02:00
Nikita Popov
9ce5776922
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Remove incorrect format argument
2021-04-27 22:23:06 +02:00
Nikita Popov
3f71ba2611
Remove incorrect format argument
...
rc is not used by the printf format.
2021-04-27 22:22:32 +02:00
Dmitry Stogov
721bd973f9
Fixed CPU detection
2021-04-27 23:00:09 +03:00
Christoph M. Becker
7be5e78dab
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
2021-04-27 17:12:58 +02:00
Christoph M. Becker
4c80e439a8
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
2021-04-27 17:12:01 +02:00
Christoph M. Becker
7f83976200
Fix #80460 : ODBC doesn't account for SQL_NO_TOTAL indicator
...
The `StrLen_or_IndPtr` parameter usually may be `SQL_NO_TOTAL`; we need
to cater to that possibility to avoid working with negative string
lengths and other issues. A noteable exemption are calls to
`SQLGetData()` which return `SQL_SUCCESS`; in that case `SQL_NO_TOTAL`
can not occur.
Closes GH-6809.
2021-04-27 17:09:36 +02:00
Nikita Popov
b74f5ee477
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix build warning
2021-04-27 10:11:20 +02:00
Nikita Popov
7544f66da9
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix build warning
2021-04-27 10:10:55 +02:00
Nikita Popov
310c0561a9
Fix build warning
...
This causes the build to fail on PHP-8.0 and higher.
2021-04-27 10:10:22 +02:00
Stanislav Malyshev
3d2c810eeb
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #80710 : imap_mail_compose() header injection
2021-04-26 22:26:42 -07:00
Stanislav Malyshev
a4d9ccbcd6
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80710 : imap_mail_compose() header injection
2021-04-26 21:49:38 -07:00
Stanislav Malyshev
568df31698
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80710 : imap_mail_compose() header injection
2021-04-26 21:48:16 -07:00
Christoph M. Becker
37962c61d2
Fix #80710 : imap_mail_compose() header injection
...
Like `mail()` and `mb_send_mail()`, `imap_mail_compose()` must prevent
header injection. For maximum backward compatibility, we still allow
header folding for general headers, and still accept trailing line
breaks for address lists.
2021-04-26 21:43:03 -07:00
Stanislav Malyshev
476888d99b
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Revert "Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement"
2021-04-26 21:03:23 -07:00
Stanislav Malyshev
eed03fce59
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Revert "Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement"
2021-04-26 21:02:09 -07:00
Stanislav Malyshev
2b3346208a
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Revert "Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement"
2021-04-26 21:02:03 -07:00
Stanislav Malyshev
1b88c85cd8
Revert "Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement"
...
Sorry, this solution seems to have BC breaks, will need to look
for better one.
This reverts commit 9f7e8b777c .
2021-04-26 21:01:25 -07:00
Stanislav Malyshev
833fac34d0
Merge branch 'PHP-8.0'
...
* PHP-8.0:
Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement
2021-04-26 20:51:46 -07:00
Stanislav Malyshev
6de2d54425
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement
2021-04-26 20:50:29 -07:00
Stanislav Malyshev
76637017ac
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement
2021-04-26 20:50:15 -07:00
Christoph M. Becker
9f7e8b777c
Fix #80852 : Stack-overflow when json_encode()'ing SimpleXMLElement
...
We ignore `XML_ENTITY_DECL` nodes when getting the hash of the
properties of a `SimpleXMLElement`.
2021-04-26 20:43:45 -07:00
Máté Kocsis
12799847a6
Merge branch 'PHP-8.0'
...
* Fix pg_get_notify() parameter name
2021-04-26 19:38:57 +02:00
Máté Kocsis
d1e590fe72
Fix pg_get_notify() parameter name
...
Closes GH-6916
2021-04-26 19:37:41 +02:00
Aaron Piotrowski
c276c16b66
Implement Fibers
...
RFC: https://wiki.php.net/rfc/fibers
Closes GH-6875.
2021-04-26 11:07:06 -05:00
Nikita Popov
ba337577a8
Use zend_string for pgsql_trim_message
2021-04-26 16:45:38 +02:00
Christoph M. Becker
50f5877769
Fix new test wrt. removed skipif.inc
2021-04-26 16:29:43 +02:00
Nikita Popov
f26047fc9b
Don't store resolved pgsql field/table oids as resources
...
Store these in hash tables indexed by oid. This is simpler and
more efficient, as we don't need to create resources or hash keys.
2021-04-26 15:24:07 +02:00