]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-8.0'
Stanislav Malyshev [Wed, 27 Jan 2021 08:15:50 +0000 (00:15 -0800)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Rm unneeded function

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Stanislav Malyshev [Wed, 27 Jan 2021 08:15:43 +0000 (00:15 -0800)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Rm unneeded function

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Wed, 27 Jan 2021 08:15:13 +0000 (00:15 -0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Rm unneeded function

4 years agoRm unneeded function
Stanislav Malyshev [Wed, 27 Jan 2021 08:13:43 +0000 (00:13 -0800)]
Rm unneeded function

4 years agoMerge branch 'PHP-8.0'
Stanislav Malyshev [Wed, 27 Jan 2021 07:01:40 +0000 (23:01 -0800)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Alternative fix for bug 77423

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Stanislav Malyshev [Wed, 27 Jan 2021 06:55:16 +0000 (22:55 -0800)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Alternative fix for bug 77423

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Stanislav Malyshev [Wed, 27 Jan 2021 06:55:10 +0000 (22:55 -0800)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Alternative fix for bug 77423

4 years agoAlternative fix for bug 77423
Christoph M. Becker [Tue, 19 Jan 2021 10:23:25 +0000 (11:23 +0100)]
Alternative fix for bug 77423

That bug report originally was about `parse_url()` misbehaving, but the
security aspect was actually only regarding `FILTER_VALIDATE_URL`.
Since the changes to `parse_url_ex()` apparently affect userland code
which is relying on the sloppy URL parsing[1], this alternative
restores the old parsing behavior, but ensures that the userinfo is
checked for correctness for `FILTER_VALIDATE_URL`.

[1] <https://github.com/php/php-src/commit/5174de7cd33c3d4fa591c9c93859ff9989b07e8c#commitcomment-45967652>

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 26 Jan 2021 18:31:51 +0000 (21:31 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed observer API and JIT compatibility

4 years agoFixed observer API and JIT compatibility
Dmitry Stogov [Tue, 26 Jan 2021 18:31:15 +0000 (21:31 +0300)]
Fixed observer API and JIT compatibility

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 26 Jan 2021 18:15:56 +0000 (19:15 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #70091: Phar does not mark UTF-8 filenames in ZIP archives

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 26 Jan 2021 18:15:00 +0000 (19:15 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #70091: Phar does not mark UTF-8 filenames in ZIP archives

4 years agoFix #70091: Phar does not mark UTF-8 filenames in ZIP archives
Christoph M. Becker [Tue, 26 Jan 2021 15:50:04 +0000 (16:50 +0100)]
Fix #70091: Phar does not mark UTF-8 filenames in ZIP archives

The default encoding of filenames in a ZIP archive is IBM Code Page
437.  Phar, however, only supports UTF-8 filenames.  Therefore we have
to mark filenames as being stored in UTF-8 by setting the general
purpose bit 11 (the language encoding flag).

The effect of not setting this bit for non ASCII filenames can be seen
in popular tools like 7-Zip and UnZip, but not when extracting the
archives via ext/phar (which is agnostic to the filename encoding), or
via ext/zip (which guesses the encoding).  Thus we add a somewhat
brittle low-level test case.

Closes GH-6630.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 26 Jan 2021 18:10:04 +0000 (19:10 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Update version

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 26 Jan 2021 18:09:35 +0000 (19:09 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Update version

4 years agoUpdate version
Christoph M. Becker [Tue, 26 Jan 2021 18:07:57 +0000 (19:07 +0100)]
Update version

That appears to have been forgotten for a while.

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 26 Jan 2021 16:25:50 +0000 (19:25 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Allow observer handlers disabling optimization in RETURN opcode handler, that may cause loss value of returned local variable.

4 years agoAllow observer handlers disabling optimization in RETURN opcode handler, that may...
Dmitry Stogov [Tue, 26 Jan 2021 16:23:13 +0000 (19:23 +0300)]
Allow observer handlers disabling optimization in RETURN opcode handler, that may cause loss value of returned local variable.

4 years agoRemove unused mmap member in phpdbg_file_source
Nikita Popov [Tue, 26 Jan 2021 16:10:26 +0000 (17:10 +0100)]
Remove unused mmap member in phpdbg_file_source

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Tue, 26 Jan 2021 15:44:56 +0000 (18:44 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Skip dummy frames allocated on CPU stack of zend_call_function(). (Usage of "current_observed_frame" varible looks unsafe to me).

4 years agoSkip dummy frames allocated on CPU stack of zend_call_function().
Dmitry Stogov [Tue, 26 Jan 2021 15:41:26 +0000 (18:41 +0300)]
Skip dummy frames allocated on CPU stack of zend_call_function().
(Usage of "current_observed_frame" varible looks unsafe to me).

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 26 Jan 2021 14:18:04 +0000 (15:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix VAR return type verification

4 years agoFix VAR return type verification
Nikita Popov [Tue, 26 Jan 2021 14:15:18 +0000 (15:15 +0100)]
Fix VAR return type verification

We should also set retval_ref when de-indirecting. Otherwise the
retval_ref != retval_ptr comparison below may incorrect assume
that we're returning a reference.

I don't have a reliable reproducer for this issue, but it sometimes
appears in certain configurations in arrow_functions/007.phpt in
conjunction with other changes.

4 years agoFix proptable canonicalization bypass in ArrayObject
Nikita Popov [Tue, 26 Jan 2021 11:44:53 +0000 (12:44 +0100)]
Fix proptable canonicalization bypass in ArrayObject

When an ArrayObject wraps an object, we should be using the
proptable canonicalilzation rules, which require all keys to be
strings.

4 years agoAdd missing resource key warning for unset()
Nikita Popov [Tue, 26 Jan 2021 11:50:28 +0000 (12:50 +0100)]
Add missing resource key warning for unset()

It was present on other operations, including isset(), but was
missing for unset().

4 years agoAdd support for generating class entries from stubs
Máté Kocsis [Tue, 26 Jan 2021 10:50:36 +0000 (11:50 +0100)]
Add support for generating class entries from stubs

Closes GH-6289

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
4 years agoDistinguishing opcache SHM on stats tools for Mac
David CARLIER [Wed, 20 Jan 2021 20:03:56 +0000 (20:03 +0000)]
Distinguishing opcache SHM on stats tools for Mac

Closes GH-6628.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Mon, 25 Jan 2021 17:49:50 +0000 (18:49 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 25 Jan 2021 17:48:35 +0000 (18:48 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon

4 years agoFix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon
Christoph M. Becker [Mon, 25 Jan 2021 16:12:48 +0000 (17:12 +0100)]
Fix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon

We add the failure reason to the error message.

Closes GH-6638.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 25 Jan 2021 15:18:11 +0000 (16:18 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Improve switch continue warning

4 years agoImprove switch continue warning
Nikita Popov [Mon, 25 Jan 2021 15:17:14 +0000 (16:17 +0100)]
Improve switch continue warning

Don't suggest "continue N+1" if there is no wrapping loop. The
resulting code would be illegal.

4 years agoRemove unnecessary TRUE/FALSE defines in tidy
Nikita Popov [Mon, 25 Jan 2021 14:51:20 +0000 (15:51 +0100)]
Remove unnecessary TRUE/FALSE defines in tidy

Instead use standard true/false.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Mon, 25 Jan 2021 14:44:44 +0000 (15:44 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #53251: bindtextdomain with null dir doesn't return old value

4 years agoFix #53251: bindtextdomain with null dir doesn't return old value
Christoph M. Becker [Fri, 22 Jan 2021 12:08:51 +0000 (13:08 +0100)]
Fix #53251: bindtextdomain with null dir doesn't return old value

Apparently, users expect `bindtextdomain` and `bind_textdomain_codeset`
with `null` as second argument to work like their C counterparts,
namely to return the previously set value.  Thus, we support that.

Closes GH-6631.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Mon, 25 Jan 2021 14:11:56 +0000 (15:11 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix opcache phpize build on FreeBSD
  Updated to version 2021.1 (2021a)

4 years agoFix opcache phpize build on FreeBSD
Alex Samorukov [Fri, 8 Jan 2021 18:09:09 +0000 (19:09 +0100)]
Fix opcache phpize build on FreeBSD

Closes GH-6589.

4 years agoAllow specifying sqlite3 DSN (file:/) in PDO SQLite
tzmfreedom [Sun, 17 Jan 2021 05:13:19 +0000 (14:13 +0900)]
Allow specifying sqlite3 DSN (file:/) in PDO SQLite

Closes GH-6610.

4 years agoFix parsing of semi-reserved tokens at offset > 4 GB
Nikita Popov [Mon, 25 Jan 2021 13:36:18 +0000 (14:36 +0100)]
Fix parsing of semi-reserved tokens at offset > 4 GB

To avoid increasing the size of parser stack elements by storing
size_t offset and length, this instead only stores the start
offset (or rather pointer now) and determines the length of the
identifier in zend_lex_tstring.

4 years agoUpdated to version 2021.1 (2021a)
Derick Rethans [Mon, 25 Jan 2021 10:44:07 +0000 (10:44 +0000)]
Updated to version 2021.1 (2021a)

4 years agoEmpty merge
Derick Rethans [Mon, 25 Jan 2021 10:44:07 +0000 (10:44 +0000)]
Empty merge

4 years agoUpdated to version 2021.1 (2021a)
Derick Rethans [Mon, 25 Jan 2021 10:44:06 +0000 (10:44 +0000)]
Updated to version 2021.1 (2021a)

4 years agoEmpty merge
Derick Rethans [Mon, 25 Jan 2021 10:44:06 +0000 (10:44 +0000)]
Empty merge

4 years agoUpdated to version 2021.1 (2021a)
Derick Rethans [Mon, 25 Jan 2021 10:44:05 +0000 (10:44 +0000)]
Updated to version 2021.1 (2021a)

4 years agoEmpty merge
Derick Rethans [Mon, 25 Jan 2021 10:44:05 +0000 (10:44 +0000)]
Empty merge

4 years agoUpdated to version 2021.1 (2021a)
Derick Rethans [Mon, 25 Jan 2021 10:44:04 +0000 (10:44 +0000)]
Updated to version 2021.1 (2021a)

4 years agoImprove error message for leading comma in keyed list assignment
Nikita Popov [Mon, 25 Jan 2021 10:12:21 +0000 (11:12 +0100)]
Improve error message for leading comma in keyed list assignment

Print "Cannot use empty array entries in keyed array assignment"
instead of "Cannot mix keyed and unkeyed array entries in assignments"
for a leading comma.

4 years agoDisable jit in observer opline test
Nikita Popov [Mon, 25 Jan 2021 09:41:34 +0000 (10:41 +0100)]
Disable jit in observer opline test

This test fails in --repeat mode with tracing JIT.

4 years agoFix #80330: Replace language in APIs and source code/docs
Darek Slusarczyk [Sat, 23 Jan 2021 16:14:13 +0000 (17:14 +0100)]
Fix #80330: Replace language in APIs and source code/docs

Rename MYSQLI_REFRESH_SLAVE to MYSQLI_REFRESH_REPLICA in line with
upstream change in MySQL. The old name is retained for
backwards-compatibility reasons, and may be deprecated/removed in
the future.

Closes GH-6632.

4 years agoAdd documentation of array_is_list() to UPGRADING
Tyson Andre [Sun, 24 Jan 2021 21:23:13 +0000 (16:23 -0500)]
Add documentation of array_is_list() to UPGRADING

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Sun, 24 Jan 2021 16:58:51 +0000 (17:58 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add missing stub for SNMPException

4 years agoAdd missing stub for SNMPException
Christoph M. Becker [Sun, 24 Jan 2021 16:58:26 +0000 (17:58 +0100)]
Add missing stub for SNMPException

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Sun, 24 Jan 2021 15:07:34 +0000 (16:07 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add missing stub for com_exception

4 years agoAdd missing stub for com_exception
Christoph M. Becker [Sun, 24 Jan 2021 15:06:49 +0000 (16:06 +0100)]
Add missing stub for com_exception

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Thu, 21 Jan 2021 16:30:26 +0000 (17:30 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add missing SKIPIF clause for recently introduced test case

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 21 Jan 2021 16:28:41 +0000 (17:28 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Add missing SKIPIF clause for recently introduced test case

4 years agoAdd missing SKIPIF clause for recently introduced test case
Christoph M. Becker [Thu, 21 Jan 2021 16:16:54 +0000 (17:16 +0100)]
Add missing SKIPIF clause for recently introduced test case

4 years agoAccept zend_string in zend_prepare_string_for_scanning
Nikita Popov [Thu, 21 Jan 2021 09:31:32 +0000 (10:31 +0100)]
Accept zend_string in zend_prepare_string_for_scanning

4 years agoFixed crash in ZTS build with --repeat option
Dmitry Stogov [Thu, 21 Jan 2021 08:39:13 +0000 (11:39 +0300)]
Fixed crash in ZTS build with --repeat option

4 years agoAdd array_is_list(array $array) function
Dusk [Mon, 4 Nov 2019 02:51:49 +0000 (18:51 -0800)]
Add array_is_list(array $array) function

This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the community usage
of "list" as an annotation type, cf.
https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists

Rebased and modified version of #4886

- Use .stub.php files
- Add opcache constant evaluation when argument is a constant
- Change from is_list(mixed $value) to array_is_list(array $array)

RFC: https://wiki.php.net/rfc/is_list

Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
Co-Authored-By: Dusk <dusk@woofle.net>
Closes GH-6070

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Wed, 20 Jan 2021 15:25:08 +0000 (16:25 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #80648: Fix for bug 79296 should be based on runtime version

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 20 Jan 2021 15:24:53 +0000 (16:24 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80648: Fix for bug 79296 should be based on runtime version

4 years agoFix #80648: Fix for bug 79296 should be based on runtime version
Christoph M. Becker [Wed, 20 Jan 2021 14:24:47 +0000 (15:24 +0100)]
Fix #80648: Fix for bug 79296 should be based on runtime version

Instead of checking for actually affected libzip versions, we now always
`ZIP_TRUNCATE` empty files unless `ZIP_RDONLY` is set.

Closes GH-6625.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Wed, 20 Jan 2021 10:05:39 +0000 (11:05 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Add missing SKIPIF clauses to new test cases

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 20 Jan 2021 10:04:48 +0000 (11:04 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Add missing SKIPIF clauses to new test cases

4 years agoAdd missing SKIPIF clauses to new test cases
Christoph M. Becker [Wed, 20 Jan 2021 09:59:37 +0000 (10:59 +0100)]
Add missing SKIPIF clauses to new test cases

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Wed, 20 Jan 2021 09:09:46 +0000 (10:09 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Skip preloading test on windows

4 years agoSkip preloading test on windows
Nikita Popov [Wed, 20 Jan 2021 09:09:31 +0000 (10:09 +0100)]
Skip preloading test on windows

4 years agoMerge branch 'PHP-8.0'
Dmitry Stogov [Wed, 20 Jan 2021 08:04:30 +0000 (11:04 +0300)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)

4 years agoFixed bug #80634 (write_property handler of internal classes is skipped on preloaded...
Dmitry Stogov [Wed, 20 Jan 2021 08:03:37 +0000 (11:03 +0300)]
Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code)

4 years agoUpdate 'East Asian Width' table to comply with Unicode 13.0
Alex Dowad [Thu, 24 Sep 2020 08:40:49 +0000 (10:40 +0200)]
Update 'East Asian Width' table to comply with Unicode 13.0

Instead of manually maintaining the data in eaw_table.h, it is now automatically
generated by ucgendat/ucgendat.php, using the EastAsianWidth.txt file from
the Unicode Consortium.

Something must be said about the deleted test case. Back in 2004, someone
noticed that `mb_strwidth` didn't comply with Unicode 4.0. A test case was
added to expose the problem. Well, time keeps moving on, and with the changing
years, new Unicodes are born and old Unicodes die. Some characters which were
counted as double-width in Unicode 4.0 are no longer such in Unicode 13.0,
which renders the test case obsolete.

At the same time, make a couple of spelling/grammar fixes in ucgendat.php.

4 years agoMerge branch 'PHP-8.0'
Gabriel Caruso [Tue, 19 Jan 2021 16:15:58 +0000 (13:15 -0300)]
Merge branch 'PHP-8.0'

4 years agoNext is 8.0.3
Gabriel Caruso [Tue, 19 Jan 2021 16:00:48 +0000 (13:00 -0300)]
Next is 8.0.3

4 years agoMerge branch 'PHP-8.0'
Gabriel Caruso [Tue, 19 Jan 2021 15:33:59 +0000 (12:33 -0300)]
Merge branch 'PHP-8.0'

4 years agoFix NEWS placeholder for the next version
Gabriel Caruso [Tue, 19 Jan 2021 15:32:17 +0000 (12:32 -0300)]
Fix NEWS placeholder for the next version

This aligns with the PHP-7.4 and PHP-7.3 branches, and should
fix the `sgolemon/php-release` script run for releasing 8.0.2.

4 years agoUse zend_string_equals() in PDO
George Peter Banyard [Tue, 19 Jan 2021 13:43:19 +0000 (13:43 +0000)]
Use zend_string_equals() in PDO

Closes GH-6623

4 years agoMerge branch 'PHP-8.0'
Derick Rethans [Tue, 19 Jan 2021 14:59:29 +0000 (14:59 +0000)]
Merge branch 'PHP-8.0'

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 19 Jan 2021 14:59:19 +0000 (14:59 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

4 years agoUpdate NEWS and version
Derick Rethans [Tue, 19 Jan 2021 14:58:38 +0000 (14:58 +0000)]
Update NEWS and version

4 years agoUpdate NEWS for PHP 7.4.15RC1
Derick Rethans [Tue, 19 Jan 2021 14:44:32 +0000 (14:44 +0000)]
Update NEWS for PHP 7.4.15RC1

4 years agoRename zend-test to zend_test
Nikita Popov [Mon, 18 Jan 2021 09:55:29 +0000 (10:55 +0100)]
Rename zend-test to zend_test

The extension name should match the name of the ext/ directory,
otherwise it will not get picked up by run-tests. It would be possible
to remap this in run-tests, but I think it's better to rename the
extension to follow the standard format. Other extensions also
use underscore instead of hyphen (e.g. pdo_mysql and not pdo-mysql).
Of course, the ./configure option remains hyphenated.

Closes GH-6613.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 19 Jan 2021 14:27:38 +0000 (15:27 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix observer tests on Windows

4 years agoFix observer tests on Windows
Nikita Popov [Tue, 19 Jan 2021 10:11:40 +0000 (11:11 +0100)]
Fix observer tests on Windows

Use %e instead of a hardcoded forward slash.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 19 Jan 2021 14:21:09 +0000 (15:21 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #80644: ResourceBundle::get() doesn't reset error state

4 years agoFixed bug #80644: ResourceBundle::get() doesn't reset error state
Nikita Popov [Tue, 19 Jan 2021 14:20:01 +0000 (15:20 +0100)]
Fixed bug #80644: ResourceBundle::get() doesn't reset error state

4 years agoUse standard C99 64bits int types
George Peter Banyard [Tue, 19 Jan 2021 12:04:47 +0000 (12:04 +0000)]
Use standard C99 64bits int types

Closes GH-6622

4 years agophp_pdo_register_driver() might fail
George Peter Banyard [Tue, 19 Jan 2021 12:54:42 +0000 (12:54 +0000)]
php_pdo_register_driver() might fail

Therefore correctly report failure in MINIT for the drivers which didn't.

4 years agoRemove unnecessary (char*) casts
George Peter Banyard [Tue, 19 Jan 2021 12:40:50 +0000 (12:40 +0000)]
Remove unnecessary (char*) casts

The functions accepts a const char*

4 years agoRefactor PDO's last inserted ID handler to use and return zend_string
George Peter Banyard [Mon, 18 Jan 2021 16:29:32 +0000 (16:29 +0000)]
Refactor PDO's last inserted ID handler to use and return zend_string

Closes GH-6617

4 years agoRefactor PDO doer handler to use zend_string
George Peter Banyard [Mon, 18 Jan 2021 16:07:24 +0000 (16:07 +0000)]
Refactor PDO doer handler to use zend_string

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 19 Jan 2021 10:44:49 +0000 (11:44 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fixed bug #42560

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 19 Jan 2021 10:44:22 +0000 (11:44 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #42560

4 years agoFixed bug #42560
sj-i [Sun, 20 Dec 2020 06:57:54 +0000 (15:57 +0900)]
Fixed bug #42560

Check open_basedir after the fallback to the system's temporary
directory in tempnam().

In order to preserve the current behavior of upload_tmp_dir
(do not check explicitly specified dir, but check fallback),
new flags are added to check open_basedir for explicit dir
and for fallback.

Closes GH-6526.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 19 Jan 2021 09:35:35 +0000 (10:35 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  ldap_search() and friends can return array

4 years agoldap_search() and friends can return array
Christoph M. Becker [Mon, 18 Jan 2021 22:39:42 +0000 (23:39 +0100)]
ldap_search() and friends can return array

See the description of <https://www.php.net/ldap-search>, and also the
implementation.

Closes GH-6620.

4 years agoMerge branch 'PHP-8.0'
Christoph M. Becker [Tue, 19 Jan 2021 09:31:06 +0000 (10:31 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Fix #69279: Compressed ZIP Phar extractTo() creates garbage files

4 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 19 Jan 2021 09:30:06 +0000 (10:30 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #69279: Compressed ZIP Phar extractTo() creates garbage files

4 years agoFix #69279: Compressed ZIP Phar extractTo() creates garbage files
Christoph M. Becker [Fri, 18 Dec 2020 17:05:52 +0000 (18:05 +0100)]
Fix #69279: Compressed ZIP Phar extractTo() creates garbage files

When extracting compressed files from an uncompressed Phar, we must not
use the direct file pointer, but rather get an uncompressed file
pointer.

We also add a test to show that deflated and stored entries are
properly extracted.

This also fixes #79912, which appears to be a duplicate of #69279.

Co-authored-by: Anna Filina <afilina@gmail.com>
Closes GH-6599.

4 years agoMerge branch 'PHP-8.0'
Nikita Popov [Tue, 19 Jan 2021 09:28:42 +0000 (10:28 +0100)]
Merge branch 'PHP-8.0'

* PHP-8.0:
  Keep JIT region executable under ZTS

4 years agoKeep JIT region executable under ZTS
Dylan K. Taylor [Mon, 11 Jan 2021 22:39:14 +0000 (22:39 +0000)]
Keep JIT region executable under ZTS

When one thread tries to compile a script, another thread may
already be executing JITed code. In this case we can't make the
memory non-executable.

This violates the W^X principle, but doesn't seem to be avoidable
for ZTS builds for now. The same problem does not exist for NTS,
as it's a different process executing there, which has it's own
memory protection mapping.

Closes GH-6595.