1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

71322 Commits

Author SHA1 Message Date
Máté Kocsis
1683b8f3dd ext/uri: Fix the distinction between an empty and a missing query/fragment for WHATWG URLs (#20208)
(cherry picked from commit 88285c3333)
2025-11-11 09:59:32 -08:00
Tim Düsterhus
dc845f0e19 uri: Update to uriparser-0.9.9-59-gc3b4956 (#20437)
This is specifically to backport uriparser/uriparser#276.

Fixes php/php-src#20431.

(cherry picked from commit 8a0c300d02)
2025-11-11 09:57:54 -08:00
Niels Dossche
7bc8ecb623 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  random: Fix memory leak when serialization fails (#20383)
2025-11-04 08:33:44 +01:00
Niels Dossche
3c1c7a0fe4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  random: Fix memory leak when serialization fails (#20383)
2025-11-04 08:33:31 +01:00
Niels Dossche
720e006982 random: Fix memory leak when serialization fails (#20383)
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
2025-11-04 08:32:22 +01:00
Gina Peter Banyard
3afac4c7f1 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix include paths for new pgsql tests
2025-11-04 04:42:53 +00:00
Gina Peter Banyard
14ed75e560 Fix include paths for new pgsql tests 2025-11-04 04:42:42 +00:00
Gina Peter Banyard
7c6affd617 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update NEWS for recent pgsql bugfix
  ext/pgsql: Fix segfaults when attempting to fetch row into a non-instantiable class name (#20180)
2025-11-04 00:09:44 +00:00
Gina Peter Banyard
afca514c3b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update NEWS for recent pgsql bugfix
  ext/pgsql: Fix segfaults when attempting to fetch row into a non-instantiable class name (#20180)
2025-11-04 00:08:42 +00:00
Gina Peter Banyard
94dc6ae871 ext/pgsql: Fix segfaults when attempting to fetch row into a non-instantiable class name (#20180)
Also fix Windows CI with Postgres and CLEAN sections

---------

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2025-11-04 00:04:30 +00:00
Niels Dossche
ed3e48b506 Revert "Upgrade bundled pcre2lib to 10.45 (#17825)"
This reverts commit e92848789a.
2025-11-03 23:01:50 +01:00
Niels Dossche
3ef966ceb7 Revert "Update pcre2lib from 10.45 to 10.46 (#19618)"
This reverts commit 84b78c047e.
2025-11-03 23:01:50 +01:00
Máté Kocsis
cf3b30581d Reorganize ext/uri tests - parsing (#20340) 2025-11-03 21:51:56 +01:00
Niels Dossche
afb7b97d44 Fixes to uri serialization (#20369)
- Incoming data should never have an INDIRECT element, that would be a
  violation of the rules wrt the INDIRECT types. Therefore there was
  never a need to use the _ind variant of the hash table find.
- It doesn't matter now because there are no properties; but the
  get_properties handler cannot be used in the output of a __serialize
  call as that would expose INDIRECT elements.
  To prevent issues in the future, make it an empty array as a
  placeholder. If in the future properties are added, then this will
  hard fail instead of silently fail with INDIRECTs.
2025-11-02 23:52:32 +01:00
Máté Kocsis
e386864b5a Fix the distinction between missing and empty username/password for RFC3986 URIs (#20335) 2025-11-02 23:33:58 +01:00
Tim Düsterhus
a22793db2b uri: Unify exception testing for modification tests (#20368)
Catch any Throwable and print the exact class name.
2025-11-02 22:44:25 +01:00
David Carlier
0e9c39deb9 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/zip: fix memory leak when encryption is passed as userland array option.
2025-11-02 21:17:05 +00:00
David Carlier
6d12688c9e Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/zip: fix memory leak when encryption is passed as userland array option.
2025-11-02 21:16:55 +00:00
David Carlier
55f7303d73 ext/zip: fix memory leak when encryption is passed as userland array option.
Similar issue fixed in GH-19936.

close GH-20363
2025-11-02 21:15:07 +00:00
Tim Düsterhus
81f6ba5503 uri: Use the “includes credentials” rule for WhatWg user/password getters (#20303)
* uri: Use the “includes credentials” rule for WhatWg user/password getters

The URL serializing algorithm from the WHATWG URL Standard uses an “includes
credentials” rule to decide whether or not to include the `@` in the output,
indicating the presence of a userinfo component in RFC 3986 terminology. Use
this rule to determine whether or not an empty username or password should be
returned as the empty string (present but empty) or NULL (not present).

* uri: Use ZVAL_STRINGL_FAST in `whatwg_(username|password)_read()`

This nicely sidesteps the undefined behavior with passing a `(NULL, 0)` pair
without needing manual logic.

* NEWS
2025-11-01 14:15:06 +01:00
Niels Dossche
cda8daaccf Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:54 +01:00
Niels Dossche
981b8c65ed Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:11 +01:00
Niels Dossche
be8c8a9d6b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Update zlib test to use separate file for flock()
2025-11-01 09:30:04 +01:00
Niels Dossche
df423e4f08 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Update zlib test to use separate file for flock()
2025-11-01 09:29:55 +01:00
Niels Dossche
c3d6bf65d5 Update zlib test to use separate file for flock()
This should prevent the nightly failures that fail with permission
denied on platforms with mandatory locks.

Closes GH-20351.
2025-11-01 09:29:45 +01:00
Ilija Tovilo
ab0a9155d4 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Reset Z_EXTRA_P(op2) of ZEND_INIT_FCALL for opcache file cache
2025-10-31 17:50:42 +01:00
Ilija Tovilo
50c7f498b9 Reset Z_EXTRA_P(op2) of ZEND_INIT_FCALL for opcache file cache
The offset becomes stale if the environment changes. We're currently relying on
other factors in the environment staying constant, e.g. send types. But this
seems to be the worst offender.

Partially addresses GH-17733
Closes GH-20328
2025-10-31 17:50:02 +01:00
Niels Dossche
1dd866d89c Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
2025-10-31 08:07:28 +01:00
Niels Dossche
ae7117b177 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
2025-10-31 08:05:01 +01:00
Niels Dossche
6fe40de6e3 Fix GH-20302: Freeing a phar alias may invalidate PharFileInfo objects
Closes GH-20345.
2025-10-31 08:04:25 +01:00
Niels Dossche
0b974dd663 Fix GH-20201: AVIF images misdetected as HEIF after introducing HEIF support in getimagesize()
Closes GH-20234.
2025-10-29 22:52:18 +01:00
Gina Peter Banyard
9a1b8a785d Fix GH-20194: null offset deprecation not emitted for writes (#20238)
Based on a patch from @ndossche
2025-10-29 18:36:10 +00:00
Calvin Buckley
0960689ba1 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Move iconv const check into autoconf (8.3) (#20247)
2025-10-29 14:39:48 -03:00
Calvin Buckley
0a8cb02c64 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Move iconv const check into autoconf (8.3) (#20247)
2025-10-29 14:38:35 -03:00
Calvin Buckley
d9bae1d1f5 Move iconv const check into autoconf (8.3) (#20247)
See GH-16847
2025-10-29 14:35:08 -03:00
Daniel Scherzer
b35b5e0050 ext/lexbor: use PHP_VERSION for extension version (#20291)
To match most other bundled extensions, instead of having no version at all
2025-10-28 10:51:05 -07:00
Ilija Tovilo
76e26c6c3c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Unparallelize imap
2025-10-28 00:49:32 +01:00
Ilija Tovilo
fc1bc9c695 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Unparallelize imap
2025-10-28 00:49:26 +01:00
Ilija Tovilo
20654ce4c9 [skip ci] Unparallelize imap
It's removed for PHP 8.4 anyway, and still regularly causes "Mailbox already
exists" errors despite the flaky flag.
2025-10-28 00:48:19 +01:00
David Carlier
1b220cb243 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/gd: Fix GH-19955 unit test.
2025-10-27 17:45:52 +00:00
David Carlier
f1a5c53544 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ext/gd: Fix GH-19955 unit test.
2025-10-27 17:45:40 +00:00
David Carlier
3c063abba1 ext/gd: Fix GH-19955 unit test.
Adding guard for imagefttext() availability.

close GH-20309
2025-10-27 17:45:17 +00:00
Niels Dossche
6bcc4e2c09 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20240: FTP with SSL: ftp_fput(): Connection timed out on successful writes
2025-10-26 23:39:56 +01:00
Niels Dossche
6dab33a438 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-20240: FTP with SSL: ftp_fput(): Connection timed out on successful writes
2025-10-26 23:39:02 +01:00
Niels Dossche
8761c4e507 Fix GH-20240: FTP with SSL: ftp_fput(): Connection timed out on successful writes
Looking at the strace, the timeout is only 1s which may be too low
anyway for checking for a response, but some servers also don't end up
replying finally anyway and close the connection already.

`data_available` was originally used for non-blocking downloads/uploads
and then reused for the shutdown sequence, but its error handling was
never adjusted to be silent.

Closes GH-20294.
2025-10-26 23:38:09 +01:00
Niels Dossche
393302bc62 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ftp: Fix weird typo (#20295)
2025-10-26 08:57:21 +01:00
Niels Dossche
d4030362cf Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  ftp: Fix weird typo (#20295)
2025-10-26 08:57:14 +01:00
Niels Dossche
61b0d589d6 ftp: Fix weird typo (#20295)
* ftp: Fix weird typo

In 8827f8eca9 the async functions were
renamed to nb functions. So this was just a find+replace of async to nb.
The diff shows that "no asyncronous transfer to continue" was replaced
with "no nbronous transfer to continue". Makes no sense.

* Update ext/ftp/php_ftp.c

Co-authored-by: Jakub Zelenka <bukka@php.net>

---------

Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-10-26 08:56:56 +01:00
David Carlier
3884438fe3 ext/zip: ZipArchive callback missing zend_release_fcall_info_cache
during FCC conversion (79b9fe3) in the rare cases where the lib
fails to allocate the memory for these callbacks, we return false
directly.

close GH-20293
2025-10-25 21:50:43 +01:00
Máté Kocsis
27bc7c0e12 Reorganize ext/uri tests - withers (#19970) 2025-10-25 14:46:06 +02:00