]> granicus.if.org Git - php/log
php
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.

4 years agoAdd proper count() parameter type
Nikita Popov [Fri, 25 Sep 2020 10:31:05 +0000 (12:31 +0200)]
Add proper count() parameter type

We can make this Countable|array now.

4 years agoPromote a few forgotten warnings to exceptions
Máté Kocsis [Fri, 25 Sep 2020 08:18:12 +0000 (10:18 +0200)]
Promote a few forgotten warnings to exceptions

Closes GH-6211

4 years agoUpdate ext/odbc stub hash
Máté Kocsis [Fri, 25 Sep 2020 09:19:50 +0000 (11:19 +0200)]
Update ext/odbc stub hash

4 years agoImprove parameter names in ext/curl
Máté Kocsis [Thu, 17 Sep 2020 18:15:01 +0000 (20:15 +0200)]
Improve parameter names in ext/curl

Closes GH-6155

4 years agoUnify 32-bit/64-bit str_split tests
Nikita Popov [Fri, 25 Sep 2020 08:03:41 +0000 (10:03 +0200)]
Unify 32-bit/64-bit str_split tests

The 32-bit tests work on both 32-bit and 64-bit. I dropped the
64-bit variants as they only test one additional case that I don't
think adds particular value.

4 years agoNormalize substr() behavior
Nikita Popov [Tue, 22 Sep 2020 07:56:08 +0000 (09:56 +0200)]
Normalize substr() behavior

Make the behavior of substr(), mb_substr(), iconv_substr() and
grapheme_substr() consistent when it comes to the handling of
out of bounds offsets. substr() will now always clamp out of
bounds offsets to the string boundary. Cases that previously
returned false will now return an empty string. This means that
substr() itself *always* returns a string now (like mb_substr()
already did before.)

Closes GH-6182.

4 years agoFix #64937: Firebird PDO preprocessing sql
Simonov Denis [Wed, 18 Dec 2019 19:42:07 +0000 (20:42 +0100)]
Fix #64937: Firebird PDO preprocessing sql

This patch fixes some problems with preprocessing SQL queries.

* The new algorithm takes into account single-line and multi-line
  comments and ignores the ":" and "?" Parameter markers in them.

* The algorithm allows the EXECUTE BLOCK statement to be processed
  correctly. For this statement, it is necessary to search for
  parameter markers between EXECUTE BLOCK and AS, the rest should be
  left as is.

The SQL preprocessing code has been ported from Firebird to handle
EXECUTE STATEMENT.

Closes GH-4920.

4 years agoRemove outdated link to bug report
Christoph M. Becker [Thu, 24 Sep 2020 21:20:29 +0000 (23:20 +0200)]
Remove outdated link to bug report

That bug has been fixed, so no need to keep that link any longer.

4 years agoFix UNKNOWN default values in ext/odbc
Máté Kocsis [Thu, 17 Sep 2020 17:35:40 +0000 (19:35 +0200)]
Fix UNKNOWN default values in ext/odbc

Closes GH-6154

4 years agoImprove parameter names in ext/hash and ext/openssl
Máté Kocsis [Thu, 17 Sep 2020 18:39:21 +0000 (20:39 +0200)]
Improve parameter names in ext/hash and ext/openssl

Closes GH-6156

4 years agoUpdate fileinfo parameter names
Nikita Popov [Thu, 24 Sep 2020 13:37:10 +0000 (15:37 +0200)]
Update fileinfo parameter names

Closes GH-6206.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Thu, 24 Sep 2020 15:14:22 +0000 (17:14 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Use proper skipif section

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 24 Sep 2020 15:13:01 +0000 (17:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Use proper skipif section

4 years agoUse proper skipif section
Christoph M. Becker [Thu, 24 Sep 2020 15:10:09 +0000 (17:10 +0200)]
Use proper skipif section

The ODBC tests have to be skipped if no connection to the server can be
established.

4 years agoSkip imap_lsub_basic.phpt under asan
Nikita Popov [Thu, 24 Sep 2020 15:03:53 +0000 (17:03 +0200)]
Skip imap_lsub_basic.phpt under asan

LeakSanitizer fails on Azure with:

> Tracer caught signal 11: addr=0x0 pc=0x7f86cde7c8b0 sp=0x7f86c46bcce0

4 years agoAdd option to print parameter name stats to gen_stub
Nikita Popov [Thu, 24 Sep 2020 13:16:07 +0000 (15:16 +0200)]
Add option to print parameter name stats to gen_stub

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Thu, 24 Sep 2020 10:23:08 +0000 (12:23 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #78470: odbc_specialcolumns() no longer accepts $nullable

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 24 Sep 2020 10:16:34 +0000 (12:16 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #78470: odbc_specialcolumns() no longer accepts $nullable

4 years agoFix #78470: odbc_specialcolumns() no longer accepts $nullable
Christoph M. Becker [Thu, 24 Sep 2020 08:30:41 +0000 (10:30 +0200)]
Fix #78470: odbc_specialcolumns() no longer accepts $nullable

It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as
tenth parameter to `SQLSpecialColumns()`; otherwise the function call
fails.  Therefore the user must be allowed to pass the desired value
as parameter to `odbc_specialcolumns()` again.

Closes GH-6200.

4 years agoFix test for cases where data sources are available
Christoph M. Becker [Thu, 24 Sep 2020 09:23:20 +0000 (11:23 +0200)]
Fix test for cases where data sources are available

That `bool(false)` is a relict of adapting the test expectations to the
warning promotions.

4 years agoSkip unnecessary unknown() frames
Nikita Popov [Wed, 23 Sep 2020 15:06:28 +0000 (17:06 +0200)]
Skip unnecessary unknown() frames

Noticed this while working on attributes strict_types handling.
We sometimes insert dummy frames internally, but I don't think
these should show up in debug_backtrace output unless they're
needed, either to display an include call or to preserve file/line
information that would otherwise get lost.

Closes GH-6195.