]> granicus.if.org Git - php/log
php
4 years agoExplicitely mark nullable strings
Côme Chilliet [Mon, 21 Sep 2020 12:50:15 +0000 (14:50 +0200)]
Explicitely mark nullable strings

4 years agoFix parameter mask in ldap_next_attribute
MCMic [Thu, 17 Sep 2020 16:14:23 +0000 (18:14 +0200)]
Fix parameter mask in ldap_next_attribute

Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
4 years agoFix parameter names in ext/ldap
Côme Chilliet [Thu, 17 Sep 2020 15:13:48 +0000 (17:13 +0200)]
Fix parameter names in ext/ldap

Renamed all parameters to be consistent and concise

4 years agoFix "null" case in ldap.stub.php
Côme Chilliet [Thu, 17 Sep 2020 15:03:23 +0000 (17:03 +0200)]
Fix "null" case in ldap.stub.php

4 years agoRemove dummy_ber parameter from ldap_first_attribute and ldap_next_attribute
Côme Chilliet [Thu, 17 Sep 2020 14:53:50 +0000 (16:53 +0200)]
Remove dummy_ber parameter from ldap_first_attribute and ldap_next_attribute

It has been unused and deprecated since PHP 5.2.4

4 years agoSet all parameters to ldap_sasl_bind as NULL by default
Côme Chilliet [Thu, 17 Sep 2020 14:47:12 +0000 (16:47 +0200)]
Set all parameters to ldap_sasl_bind as NULL by default

For mech, realm, authcid, authzid and props NULL means do not change
 current server setting.

4 years agoDefault bind dn and password to NULL in ldap_bind_ext
Côme Chilliet [Thu, 17 Sep 2020 14:42:17 +0000 (16:42 +0200)]
Default bind dn and password to NULL in ldap_bind_ext

4 years agoDefault bind dn and password to NULL in ldap_bind
Côme Chilliet [Thu, 17 Sep 2020 14:40:04 +0000 (16:40 +0200)]
Default bind dn and password to NULL in ldap_bind

4 years agoMake URI parameter in ldap_connect default to NULL
Côme Chilliet [Thu, 17 Sep 2020 14:03:43 +0000 (16:03 +0200)]
Make URI parameter in ldap_connect default to NULL

4 years agobump zip extension version
Remi Collet [Tue, 29 Sep 2020 14:17:23 +0000 (16:17 +0200)]
bump zip extension version

4 years agoPromote E_NOTICE to Value/TypeError in PostgreSQL extension
George Peter Banyard [Mon, 28 Sep 2020 17:31:02 +0000 (18:31 +0100)]
Promote E_NOTICE to Value/TypeError in PostgreSQL extension

Add some tests to cover related codepaths.
With the small caveat that the ones in build_assignment_string()
still don't seem to be tested as it looks the condtions are checked
beforehand, might need some more investigation.

Closes GH-6226

4 years agoUpdate ext/tokenizer param names
Nikita Popov [Tue, 29 Sep 2020 13:21:32 +0000 (15:21 +0200)]
Update ext/tokenizer param names

Closes GH-6232.

4 years agoAllow tracing JIT cooperate with function JIT.
Dmitry Stogov [Tue, 29 Sep 2020 13:33:32 +0000 (16:33 +0300)]
Allow tracing JIT cooperate with function JIT.

4 years agoMake handling of NULL bytes in file paths more consistent (WIP)
Dik Takken [Fri, 25 Sep 2020 13:54:28 +0000 (15:54 +0200)]
Make handling of NULL bytes in file paths more consistent (WIP)

Not all extensions consistently throw exceptions when the user passes
a path name containing null bytes. Also, some extensions would throw
a ValueError while others would throw a TypeError. Error messages
also varied.

Now a ValueError is thrown after all failed path checks, at least for
as far as these occur in functions that are exposed to userland.

Closes GH-6216.

4 years agoDon't accept dir handle in Directory methods
Nikita Popov [Tue, 29 Sep 2020 12:48:31 +0000 (14:48 +0200)]
Don't accept dir handle in Directory methods

This is an artifact of the shared implementation with readdir() etc.
The method versions should not accept an explicit dir handle, as
they work on the dir handle from the object.

4 years agoTracing JIT support for preloaded scripts
Dmitry Stogov [Tue, 29 Sep 2020 12:07:45 +0000 (15:07 +0300)]
Tracing JIT support for preloaded scripts

4 years agoRemove unused variable
Nikita Popov [Tue, 29 Sep 2020 10:35:39 +0000 (12:35 +0200)]
Remove unused variable

4 years agoUpdate gmp+bcmath parameter names
Nikita Popov [Thu, 24 Sep 2020 13:28:36 +0000 (15:28 +0200)]
Update gmp+bcmath parameter names

Closes GH-6205.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 29 Sep 2020 10:16:30 +0000 (12:16 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  [ci skip] Fix version

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 10:11:48 +0000 (12:11 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] Fix version

4 years ago[ci skip] Fix version
Christoph M. Becker [Tue, 29 Sep 2020 10:10:36 +0000 (12:10 +0200)]
[ci skip] Fix version

4 years agoKeep track information about used JIT trigger in ZEND_FUNC_INFO(op_array)->func_info...
Dmitry Stogov [Tue, 29 Sep 2020 10:05:24 +0000 (13:05 +0300)]
Keep track information about used JIT trigger in ZEND_FUNC_INFO(op_array)->func_info.flags

4 years agoUse external iterator instead of via the internal pointer
Christoph M. Becker [Tue, 29 Sep 2020 09:41:17 +0000 (11:41 +0200)]
Use external iterator instead of via the internal pointer

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 29 Sep 2020 09:36:54 +0000 (11:36 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #80152: odbc_execute() moves internal pointer of $params

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 09:35:28 +0000 (11:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80152: odbc_execute() moves internal pointer of $params

4 years agoFix #80152: odbc_execute() moves internal pointer of $params
Christoph M. Becker [Sat, 26 Sep 2020 11:14:40 +0000 (13:14 +0200)]
Fix #80152: odbc_execute() moves internal pointer of $params

As least intrusive fix, we separate the passed array argument.

Closes GH-6219.

4 years agoFix #78792: zlib.output_compression disabled by Content-Type: image/
Christoph M. Becker [Wed, 23 Sep 2020 21:52:27 +0000 (23:52 +0200)]
Fix #78792: zlib.output_compression disabled by Content-Type: image/

Disabling output compression for images has served to fix bug #16109,
where zlib compressed images apparently have caused issues with
Navigator 4.  This shouldn't be an issue with somewhat contemporary
browsers.  Other than that, this is an arbitrary restriction – why
don't we disable the compression for some other media types as well
(e.g. video/* and audio/*)?  All in all, we should leave that decision
to userland.

Closes GH-6198.

4 years agoFix #22986: odbc_connect() may reuse persistent connection
Christoph M. Becker [Sun, 27 Sep 2020 21:11:56 +0000 (23:11 +0200)]
Fix #22986: odbc_connect() may reuse persistent connection

`odbc_connect()` should not reuse persistent connections, since that
prohibits multiple concurrent connections, which are occasionally
desireable.  We fix that by no longer looking for already cached
connections when `odbc_connect()` is called, and instead creating a new
connection instead.

Closes GH-6223.

4 years agoMerge branch 'PHP-7.4'
Dmitry Stogov [Tue, 29 Sep 2020 09:13:17 +0000 (12:13 +0300)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459

4 years agoFixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459
Dmitry Stogov [Tue, 29 Sep 2020 09:11:01 +0000 (12:11 +0300)]
Fixed unintended disabling of Optimizer for preloaded scripts introduced by 4a2646cf459

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 29 Sep 2020 09:05:31 +0000 (11:05 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #80150: Failure to fetch error message

4 years agoMake the $filter parameter of ReflectionClass::get*Constants() nullable
Máté Kocsis [Tue, 29 Sep 2020 07:19:45 +0000 (09:19 +0200)]
Make the $filter parameter of ReflectionClass::get*Constants() nullable

4 years agoReflection param renames amendment
Máté Kocsis [Mon, 28 Sep 2020 21:02:42 +0000 (23:02 +0200)]
Reflection param renames amendment

Closes GH-6230

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 29 Sep 2020 09:03:52 +0000 (11:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80150: Failure to fetch error message

4 years agoRename a few parameters in ext/filter
Máté Kocsis [Mon, 28 Sep 2020 20:48:34 +0000 (22:48 +0200)]
Rename a few parameters in ext/filter

Closes GH-6229

4 years agoZend parameter renames amendment
Máté Kocsis [Mon, 28 Sep 2020 20:19:20 +0000 (22:19 +0200)]
Zend parameter renames amendment

Closes GH-6228

4 years agoFix #80150: Failure to fetch error message
Christoph M. Becker [Fri, 25 Sep 2020 15:27:41 +0000 (17:27 +0200)]
Fix #80150: Failure to fetch error message

In case of statement related errors, we need to pass the respective
statement handle to `SQLError()`.

Closes GH-6217.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 29 Sep 2020 08:59:46 +0000 (10:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #80137
  Fix bug #80138

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 29 Sep 2020 08:59:32 +0000 (10:59 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #80137
  Fix bug #80138

4 years agoFix bug #80137
Matthias Karbe [Wed, 23 Sep 2020 12:54:25 +0000 (14:54 +0200)]
Fix bug #80137

Skip getprotobyname() and getprotobynumber() tests on *nix if there
is no /etc/protocols file.

Closes GH-6193.

4 years agoFix bug #80138
Matthias Karbe [Wed, 23 Sep 2020 12:25:30 +0000 (14:25 +0200)]
Fix bug #80138

Skip getservbyname() and getservbyport() tests on *nix if there is
no /etc/services file.

Closes GH-6191.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 29 Sep 2020 08:48:12 +0000 (10:48 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Synchronize php.ini-development and php.ini-production

4 years agoSynchronize php.ini-development and php.ini-production
Giovanni Giacobbi [Mon, 28 Sep 2020 22:43:23 +0000 (00:43 +0200)]
Synchronize php.ini-development and php.ini-production

Closes GH-6231.

4 years agoAdd call_user_func_array() backward incompatible change
zeriyoshi [Fri, 25 Sep 2020 21:58:03 +0000 (06:58 +0900)]
Add call_user_func_array() backward incompatible change

Closes GH-6218.

[ci skip]

4 years agoMerge branch 'PHP-7.4'
Remi Collet [Tue, 29 Sep 2020 06:52:09 +0000 (08:52 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  [ci skip] typo
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Remi Collet [Tue, 29 Sep 2020 06:51:03 +0000 (08:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  [ci skip] typo
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Remi Collet [Tue, 29 Sep 2020 06:50:14 +0000 (08:50 +0200)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  [ci skip] typo
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years ago[ci skip] typo
Remi Collet [Tue, 29 Sep 2020 06:49:56 +0000 (08:49 +0200)]
[ci skip] typo

4 years agoMerge branch 'PHP-7.4'
Stanislav Malyshev [Tue, 29 Sep 2020 05:55:37 +0000 (22:55 -0700)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Update UPGRADING
  Update UPGRADING
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Tue, 29 Sep 2020 04:42:19 +0000 (21:42 -0700)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Update UPGRADING
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoDo not decode cookie names anymore
Stanislav Malyshev [Mon, 21 Sep 2020 01:08:55 +0000 (18:08 -0700)]
Do not decode cookie names anymore

4 years agoFix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
Stanislav Malyshev [Sun, 27 Sep 2020 05:08:52 +0000 (22:08 -0700)]
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Stanislav Malyshev [Tue, 29 Sep 2020 04:39:34 +0000 (21:39 -0700)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Update NEWS & UPGRADING
  Do not decode cookie names anymore
  Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoUpdate UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:39:20 +0000 (21:39 -0700)]
Update UPGRADING

4 years agoUpdate UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:38:58 +0000 (21:38 -0700)]
Update UPGRADING

4 years agoUpdate NEWS & UPGRADING
Stanislav Malyshev [Tue, 29 Sep 2020 04:34:52 +0000 (21:34 -0700)]
Update NEWS & UPGRADING

4 years agoUpdate PDO parameters for named arguments.
Larry Garfield [Sat, 26 Sep 2020 15:41:20 +0000 (10:41 -0500)]
Update PDO parameters for named arguments.

Closes GH-6220

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 28 Sep 2020 20:59:51 +0000 (22:59 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #67465: NULL Pointer dereference in odbc_handle_preparer

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 28 Sep 2020 20:57:59 +0000 (22:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #67465: NULL Pointer dereference in odbc_handle_preparer

4 years agoFix #67465: NULL Pointer dereference in odbc_handle_preparer
Christoph M. Becker [Mon, 28 Sep 2020 15:05:17 +0000 (17:05 +0200)]
Fix #67465: NULL Pointer dereference in odbc_handle_preparer

We have to initialize `stmt->driver_data` before we use it.

Closes GH-6225.

4 years agoMove invariant type guard out of loop
Dmitry Stogov [Mon, 28 Sep 2020 20:54:28 +0000 (23:54 +0300)]
Move invariant type guard out of loop

4 years agoAnother pass making some failure states unconditional erros in PDO
George Peter Banyard [Mon, 28 Sep 2020 18:35:31 +0000 (19:35 +0100)]
Another pass making some failure states unconditional erros in PDO

Also make internal function return type more accurate to inform usage

4 years agoMake various failure conditions in PDO unconditional errors
George Peter Banyard [Thu, 24 Sep 2020 23:41:21 +0000 (00:41 +0100)]
Make various failure conditions in PDO unconditional errors

This includes TypeErrors, ValueErrors, Error for uninitialized objects
and invalid user classes/callable instanciation

Closes GH-6212

4 years agoDo not register quoter handler in ODBC
George Peter Banyard [Mon, 28 Sep 2020 16:44:13 +0000 (17:44 +0100)]
Do not register quoter handler in ODBC

This functionallity is not (yet) implemented and therefore gives a bogus error while using PDO

4 years agoDrop ZPP check in PDO MySQLi test
George Peter Banyard [Fri, 25 Sep 2020 01:43:44 +0000 (02:43 +0100)]
Drop ZPP check in PDO MySQLi test

This test is marked as XFAIL so it doesn't get looked at.

It checks that the method is called without arguments which is a ZPP concern

4 years agoDump class names
Dmitry Stogov [Mon, 28 Sep 2020 17:29:46 +0000 (20:29 +0300)]
Dump class names

4 years agoPromote notice to ValueError for invalid hint key
George Peter Banyard [Mon, 28 Sep 2020 14:14:44 +0000 (15:14 +0100)]
Promote notice to ValueError for invalid hint key

4 years agoImproved trace selection rules
Dmitry Stogov [Mon, 28 Sep 2020 14:04:34 +0000 (17:04 +0300)]
Improved trace selection rules

4 years agoPromote warnings in ext/xsl
Nikita Popov [Mon, 28 Sep 2020 13:55:22 +0000 (15:55 +0200)]
Promote warnings in ext/xsl

4 years agoRemove unused XSL_DOMOBJ_NEW() macro
Nikita Popov [Mon, 28 Sep 2020 13:41:31 +0000 (15:41 +0200)]
Remove unused XSL_DOMOBJ_NEW() macro

And inline the XSL_REGISTER_CLASS() macro.

4 years agoFixed usage of invalid frame for exit point
Dmitry Stogov [Mon, 28 Sep 2020 13:18:06 +0000 (16:18 +0300)]
Fixed usage of invalid frame for exit point

4 years agoConsistently handle out of bounds offsets in iconv_strpos()
Nikita Popov [Mon, 28 Sep 2020 11:11:07 +0000 (13:11 +0200)]
Consistently handle out of bounds offsets in iconv_strpos()

Same as in all other strpos() style functions, throw ValueError on
out of bounds offset.

4 years agoExtensions should have the final say on their compiler flags
George Peter Banyard [Thu, 24 Sep 2020 12:28:56 +0000 (13:28 +0100)]
Extensions should have the final say on their compiler flags

Currently compiler flags passed by extensions using the standard
``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` m4 macros are prepended
before the ones defined by ``Zend/Zend.m4``.

This was not really an issue before as ``Zend.m4`` only included
``-Wall`` but since the addition of ``-Wextra`` various issue about
disabling flags have been brought up.

A preliminary attempt was done in commit 5c1cf7669b937dcb4589cb0c8deccd343dfd85f9
but this turns out to be more or less irrelevant.

The root issue is that  ``PHP_NEW_EXTENSION`` and ``PHP_ADD_SOURCES`` call the
``PHP_ADD_SOURCES_X`` macro and pass their flags as the 3rd argument which prepends
the flags. There exists a 6th argument for this macro which appends them but from a
cursory look at https://heap.space/search?full=PHP_ADD_SOURCES_X&project=php-src
this is not used. Moreover, the comment describing this macro explicitly informs
that this macro should not be used directly.

As such we drop the 6th argument of ``PHP_ADD_SOURCES_X`` and move the `special-flags`
argument to be appended instead of prepended.

Closes GH-6204

4 years agoSimplify iconv_strpos implementation
Nikita Popov [Mon, 28 Sep 2020 12:15:04 +0000 (14:15 +0200)]
Simplify iconv_strpos implementation

Use a separate "reverse" flag to determine search direction,
using offset == -1 to indicate this is is confusing. I initially
thought the code was trying to handle negative offsets.

Also deduplicate the forward and reverse cases, they really only differ
in one place.

4 years agoMissed opline guard
Dmitry Stogov [Mon, 28 Sep 2020 11:47:45 +0000 (14:47 +0300)]
Missed opline guard

4 years agoThrow warning for invalid iconv charset
Nikita Popov [Mon, 28 Sep 2020 10:51:03 +0000 (12:51 +0200)]
Throw warning for invalid iconv charset

4 years agoSkip one more imap test under asan
Nikita Popov [Mon, 28 Sep 2020 07:54:44 +0000 (09:54 +0200)]
Skip one more imap test under asan

Wondering if the error just moves to a different test each time
we skip one?

4 years agoUpdate mbstring parameter names
Nikita Popov [Thu, 24 Sep 2020 14:14:26 +0000 (16:14 +0200)]
Update mbstring parameter names

Closes GH-6207.

4 years agoFixed test for MySQL < 5.6
Matteo Beccati [Mon, 28 Sep 2020 06:52:21 +0000 (08:52 +0200)]
Fixed test for MySQL < 5.6

Refs GH-6172.

4 years agoMake mysqli_warning constructor private
Nikita Popov [Thu, 24 Sep 2020 14:51:47 +0000 (16:51 +0200)]
Make mysqli_warning constructor private

The constructor was already effectively inaccessible (protected
on a final class). This just makes it more obvious and removes
the implementation in favor of directly throwing.

Per the removed test, this was an unfinished feature, and I don't
think it makes a lot of sense to finish it -- the
mysqli_stmt::get_warnings() interface makes more sense than
direct construction.

Closes GH-6208.

4 years agoRename mysqli parameters to be more logical
Larry Garfield [Sun, 20 Sep 2020 00:57:53 +0000 (19:57 -0500)]
Rename mysqli parameters to be more logical

Closes GH-6172.

4 years agoClean up spl_fixedarray.c
Levi Morrison [Sun, 27 Sep 2020 17:17:17 +0000 (11:17 -0600)]
Clean up spl_fixedarray.c

Remove inline.
Remove old folding blocks.
Convert an int usage to bool.

Convert some uses of int and size_t into zend_long. This is
incomplete because get_gc requires `int *n`, which should probably
become zend_long or size_t eventually.

Adds spl_fixedarray_empty to help enforce invariants.
Adds spl_fixedarray_default_ctor.
Documents some functions.

Reworks spl_fixedarray_copy into two functions:
  - spl_fixedarray_copy_ctor
  - spl_fixedarray_copy_range

I'm hoping to eventually export SplFixedArray for extensions to
use directly, which is the motivation here.

4 years agoAllow attributes to be applied to property/constant groups
Nikita Popov [Tue, 22 Sep 2020 12:44:06 +0000 (14:44 +0200)]
Allow attributes to be applied to property/constant groups

Remove arbitrary restriction that attributes cannot be applied
to property/constant groups.

The attribute applies to all elements of the group, just like
modifiers and types do.

See also https://externals.io/message/111914.

Closes GH-6186.

4 years agoMake constexpr compilation robust against multiple compilation
Nikita Popov [Sun, 27 Sep 2020 09:21:52 +0000 (11:21 +0200)]
Make constexpr compilation robust against multiple compilation

Instead of setting the old AST type to zero, replace the AST with
the compiled constexpr AST zval. This requires passing in a
zend_ast** instead of a zend_ast*.

This allows compiling ASTs containing constexprs multiple times
-- the second time, the existing compiled representation will be
resused.

This means we no longer need to copy the attributes AST for
promoted properties.

4 years agoHonor strict_types=1 for attributes, improve backtraces
Nikita Popov [Wed, 23 Sep 2020 11:01:07 +0000 (13:01 +0200)]
Honor strict_types=1 for attributes, improve backtraces

Make ReflectionAttribute::newInstance() respect the strict_types=1
declaration at the attribute use-site. More generally, pretend that
we are calling the attribute constructor from the place where the
attribute is used, which also means that the attribute location will
show up properly in backtraces and inside "called in" error information.

This requires us to store the attributes strict_types scope (as flags),
as well as the attribute line number. The attribute filename can be
recovered from the symbol it is used on. We might want to expose the
attribute line number via reflection as well.

See also https://externals.io/message/111915.

Closes GH-6201.

4 years agoDo not decode cookie names anymore
Stanislav Malyshev [Mon, 21 Sep 2020 01:08:55 +0000 (18:08 -0700)]
Do not decode cookie names anymore

4 years agoFix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
Stanislav Malyshev [Sun, 27 Sep 2020 05:08:52 +0000 (22:08 -0700)]
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)

4 years agoSkip test with ICU version < 58
Matteo Beccati [Sat, 26 Sep 2020 08:47:56 +0000 (10:47 +0200)]
Skip test with ICU version < 58

4 years agoPass zend_execute_data instead of zend_function to fcall init
Sammy Kaye Powers [Thu, 24 Sep 2020 19:57:43 +0000 (12:57 -0700)]
Pass zend_execute_data instead of zend_function to fcall init

The motivation for this change is to prevent extensions from having to check executor globals for the current execute_data during function call init. A previous implementation of the observer API initialized the function call from runtime cache initialization before execute_data was allocated which is why zend_function was passed in.

But now that the observer API is implemented via opcode specialization, it makes sense to pass in the execute_data. This also keeps the API a bit more consistent for existing extensions that already hook zend_execute_ex.

Closes GH-6209

4 years agoPromote warning to ValueError for Spoofchecker::setRestrictionLevel()
George Peter Banyard [Wed, 23 Sep 2020 16:02:43 +0000 (17:02 +0100)]
Promote warning to ValueError for Spoofchecker::setRestrictionLevel()

Closes GH-6197

4 years agoMerge branch 'PHP-7.4'
George Peter Banyard [Fri, 25 Sep 2020 15:35:50 +0000 (16:35 +0100)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix logic error in PDO

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Peter Banyard [Fri, 25 Sep 2020 15:32:41 +0000 (16:32 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix logic error in PDO

4 years agoFix logic error in PDO
George Peter Banyard [Fri, 25 Sep 2020 13:54:25 +0000 (14:54 +0100)]
Fix logic error in PDO

4 years agoInverse logic in do_fetch() to reduce a level of indentation
George Peter Banyard [Fri, 25 Sep 2020 03:05:53 +0000 (04:05 +0100)]
Inverse logic in do_fetch() to reduce a level of indentation

4 years agoDrop do_bind argument in do_fetch(_common)() in PDO
George Peter Banyard [Fri, 25 Sep 2020 02:55:18 +0000 (03:55 +0100)]
Drop do_bind argument in do_fetch(_common)() in PDO

It is always set to true by callers and therefore irrelevant.

4 years agoUse callable type in register_shutdown_function()
Nikita Popov [Fri, 25 Sep 2020 12:47:10 +0000 (14:47 +0200)]
Use callable type in register_shutdown_function()

To make things a bit less weird, split off the function name into
a zval stored separately from the arguments. This allows us to
use normal zpp and get standard behavior.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Fri, 25 Sep 2020 11:53:19 +0000 (13:53 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #80147: BINARY strings may not be properly zero-terminated

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 25 Sep 2020 11:51:55 +0000 (13:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #80147: BINARY strings may not be properly zero-terminated

4 years agoFix #80147: BINARY strings may not be properly zero-terminated
Christoph M. Becker [Fri, 25 Sep 2020 09:25:02 +0000 (11:25 +0200)]
Fix #80147: BINARY strings may not be properly zero-terminated

We have to manually ensure that all strings fetched from a data source
are zero-terminated.

Closes GH-6213.

4 years agoRename $qualifier/$owner params to $catalog/$schema
Christoph M. Becker [Thu, 24 Sep 2020 21:19:15 +0000 (23:19 +0200)]
Rename $qualifier/$owner params to $catalog/$schema

These have been called qualifier and owner with ODBC 2, but ODBC 3
changed that to catalog and schema, respectively.

Closes GH-6210.