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

144636 Commits

Author SHA1 Message Date
Tim Düsterhus
265c0c632b Merge branch 'PHP-8.5'
* PHP-8.5:
  output: Fail starting to output buffer when the output layer is deactivated (#20846)
2026-01-10 14:38:37 +01:00
Tim Düsterhus
1f3390283d Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  output: Fail starting to output buffer when the output layer is deactivated (#20846)
2026-01-10 14:38:27 +01:00
Tim Düsterhus
b5d6377ada output: Fail starting to output buffer when the output layer is deactivated (#20846)
Fixes php/php-src#20837.
2026-01-10 14:37:52 +01:00
Niels Dossche
c518a6ba8b Merge branch 'PHP-8.5'
* PHP-8.5:
  fastcgi: Fix compile warning wrt safe_read() (#20887)
2026-01-10 10:49:57 +01:00
Niels Dossche
750c220550 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  fastcgi: Fix compile warning wrt safe_read() (#20887)
2026-01-10 10:49:51 +01:00
Niels Dossche
60b1f59081 fastcgi: Fix compile warning wrt safe_read() (#20887)
This shouldn't be const. Fixes the following warning:
```
warning: variable 'hdr' is uninitialized when passed as a const pointer argument here
      [-Wuninitialized-const-pointer]
 1054 |         if (safe_read(req, &hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) ||
      |                             ^~~
```
2026-01-10 10:49:37 +01:00
Alex Dowad
79b52042e3 Use fast path in more cases when doing case folding with mb_convert_case
mbstring's Unicode case conversion is table-driven, using Minimal Perfect Hash tables.
However, for small codepoint values, we bypass the hashtable lookup and just use
hard-coded conversion logic (i.e. adding or subtracting 0x20 from the appropriate
ASCII range).

For upcasing and downcasing, we had already optimized the conditional which sends
execution down this fast path, to use the fast path for as many codepoint values
as possible. However, for case folding, this had not been done.

This will give a small performance boost for case-folding Unicode text which
includes non-breaking spaces, symbols like ¥ or ™, or accented Latin
characters (used in many European languages).
2026-01-10 13:10:59 +09:00
Jordi Kroon
51b1aa160d Fix GH-20858: null pointer dereference in php_mail_detect_multiple_crlf via error_log
close GH-20862
2026-01-10 00:51:25 +00:00
David Carlier
17915780db Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20840: crash on nested object with var_dump().
2026-01-09 18:15:05 +00:00
David Carlier
fb7a5712a6 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20840: crash on nested object with var_dump().
2026-01-09 18:14:05 +00:00
David Carlier
5d2456f974 Fix GH-20840: crash on nested object with var_dump().
mitigate it with stack check limit.

close GH-20843
2026-01-09 18:13:42 +00:00
Máté Kocsis
eea9a62b1b Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix constant references inside parameter default values when generating the manual
2026-01-08 22:52:32 +01:00
Máté Kocsis
eb1e22b1df Fix constant references inside parameter default values when generating the manual 2026-01-08 22:51:28 +01:00
Ilija Tovilo
ebef772cfd Merge branch 'PHP-8.5'
* PHP-8.5:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:20 +01:00
Ilija Tovilo
a5c7903fbb Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:13 +01:00
Ilija Tovilo
226f68b24f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:06 +01:00
Ilija Tovilo
33c3e30ed6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark bug69442.phpt (PTY test) as flaky
2026-01-08 12:27:00 +01:00
Ilija Tovilo
4f25ea88f0 [skip ci] Mark bug69442.phpt (PTY test) as flaky
See GH-20864
2026-01-08 12:26:20 +01:00
Arnaud Le Blanc
ef522525cf Introduce zend_ast_call_get_args() (#20859) 2026-01-08 11:46:10 +01:00
Arnaud Le Blanc
92b2887722 Fix handling of ZEND_AST_CALLABLE_CONVERT in file cache (#20860)
Nodes in zend_ast_fcc->args were serialized, but not zend_ast_fcc->args itself
2026-01-07 18:54:29 +01:00
Frank Denis
643cf6253e Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/sodium: use correct constants and error messages (#20852)
2026-01-07 09:53:54 +01:00
Frank Denis
a04fa6c1f0 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/sodium: use correct constants and error messages (#20852)
2026-01-07 09:51:46 +01:00
Frank Denis
83f3d5d487 ext/sodium: use correct constants and error messages (#20852)
Fix copy-and-paste mistakes in the sodium extension.

crypto_scalarmult_BYTES and crypto_scalarmult_ristretto255_BYTES
have the same value, so behavior is unchanged.
2026-01-07 09:45:06 +01:00
Arnaud Le Blanc
5472cac806 Support PFA syntax
RFC: https://wiki.php.net/rfc/partial_function_application_v2

For FCCs, the parser generates a normal function call AST node, the but argument
list is a ZEND_AST_CALLABLE_CONVERT / zend_ast_fcc node.

We extend this for PFAs so that zend_ast_fcc can represent arguments.

 * Support PFA syntax in grammar
 * Update zend_ast_fcc so that arguments can be represented
 * Support serialization of zend_ast_fcc arguments in SHM / file cache
 * Introduce zend_ast_arg_list_add(): Same as zend_ast_list_add(), but wraps the
   list in a ZEND_AST_CALLABLE_CONVERT when adding any placeholder argument.

Technically the arg list wrapping is not required, but it results in simpler
code later as it will be very convenient in the compiler (determines whether a
function calls is a PFA/FCC), and for PFA-in-const-expr support. It also allows
to unify FCCs and PFAs in the grammar.

Closes GH-20717.
2026-01-06 12:01:48 +01:00
Niels Dossche
e4098da58a Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
2026-01-05 20:01:59 +01:00
Niels Dossche
171b52c98f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
2026-01-05 20:01:54 +01:00
Niels Dossche
03113b09ce Fix GH-20833: mb_str_pad() divide by zero if padding string is invalid in the encoding
If the padding string is not valid in the given encoding,
mb_get_strlen() can return 0.

Closes GH-20834.
2026-01-05 20:01:25 +01:00
Remi Collet
988d29b4db Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix missing liburiparser linker option
2026-01-05 08:19:22 +01:00
Remi Collet
9b089edcbd Fix missing liburiparser linker option 2026-01-05 08:19:07 +01:00
Jordi Kroon
cb63e4f998 [skip ci] Remove obsolete comment (GH-20826) 2026-01-04 01:27:40 +01:00
Ilija Tovilo
9c4b29b236 Merge branch 'PHP-8.5'
* PHP-8.5:
  Remove duplicate no/yes print for preserve_none
2026-01-04 01:24:45 +01:00
henderkes
7b70ee5a9d Remove duplicate no/yes print for preserve_none
Closes GH-20827
2026-01-04 01:24:35 +01:00
Giovanni Giacobbi
fd0ed00ff3 curl: Deduplicate features array 2026-01-03 18:49:23 +00:00
Giovanni Giacobbi
50af7c7373 curl: Fix coding style 2026-01-03 18:49:23 +00:00
Jakub Zelenka
8422224091 Update NEWS and UPGRADING with addition of JSON error locations 2026-01-03 18:40:57 +01:00
Juan Morales
b80ffc5b2e Json last error msg/error message with location error (#20629)
This slightly extend error messages with locations taken from scanner / parser
2026-01-03 18:34:19 +01:00
Niels Dossche
46a1534e64 [ci skip] Fix NEWS entries
These entries are duplicates, but also shouldn't be here in the first
place because they were also merged into stable branches.
2026-01-03 16:40:11 +01:00
Jakub Zelenka
db65503cbc Merge branch 'PHP-8.5'
* PHP-8.5:
  Update NEWS with fix for bug #74357
  Fix bug #74357: lchown fails to change ownership of symlink with ZTS
2026-01-03 14:51:26 +01:00
Jakub Zelenka
bddd6b0cd3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update NEWS with fix for bug #74357
  Fix bug #74357: lchown fails to change ownership of symlink with ZTS
2026-01-03 14:50:27 +01:00
Jakub Zelenka
1c9f117d74 Update NEWS with fix for bug #74357 2026-01-03 14:45:42 +01:00
Jakub Zelenka
91ac825278 Fix bug #74357: lchown fails to change ownership of symlink with ZTS 2026-01-03 14:41:57 +01:00
Niels Dossche
4c9bbaa79d Merge branch 'PHP-8.5'
* PHP-8.5:
  streams/memory: Ensure internal string is NUL terminated (#20812)
2026-01-02 18:03:41 +01:00
Niels Dossche
de1465e5ae Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  streams/memory: Ensure internal string is NUL terminated (#20812)
2026-01-02 18:03:36 +01:00
Niels Dossche
5484ebcc49 streams/memory: Ensure internal string is NUL terminated (#20812)
zend_string_truncate() doesn't put a NUL byte.
2026-01-02 18:03:17 +01:00
Niels Dossche
971728fe10 Fix GH-20679: finfo_file() doesn't work on remote resources (#20700)
The remote resources don't work because remote streams don't have a stat
method.
Since the check is only here for a best-effort check to return
"directory" instead of "empty", we can try the stat and still execute
the magic_stream() code even if it failed. Unfortunately we can't
distinguish between a failed stat and an unimplemented stat. If we
could, then this code could be even more robust.
2026-01-02 17:57:30 +01:00
Ilija Tovilo
610361845b Remove unnecessary optimization FIXME
As the comment suggests, the return value of frameless calls is rarely not used.
When it isn't used (and isn't refcounted) the FREE is already elided by the
optimizer.

Closes GH-20819
2026-01-02 17:08:28 +01:00
Niels Dossche
8f8d2a4cae Merge branch 'PHP-8.5'
* PHP-8.5:
  uri: Fix RFC3986 to_string implementation with ExcludeFragment returning non-terminated strings (#20811)
2026-01-02 15:00:58 +01:00
Niels Dossche
3f7bfaf3ae uri: Fix RFC3986 to_string implementation with ExcludeFragment returning non-terminated strings (#20811)
zend_string_truncate() doesn't put a NUL byte.
Right now this doesn't matter as this code path is only hittable via the
equals() method, but if other extension (or future other code) starts
using this code path, then it can be problematic as all user-exposed
zend_strings need to end with a NUL byte.
2026-01-02 15:00:47 +01:00
Niels Dossche
ac4e3cdec0 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-18139: Memory leak when overriding some settings via readline_info()
2026-01-02 13:04:44 +01:00
Niels Dossche
d9b02e43c3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-18139: Memory leak when overriding some settings via readline_info()
2026-01-02 13:04:35 +01:00