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

72543 Commits

Author SHA1 Message Date
Ilija Tovilo
8c42cf473e Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix expected output for bug52820.phpt
2026-03-19 13:19:07 +01:00
Ilija Tovilo
f7753608cc Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix expected output for bug52820.phpt
2026-03-19 13:19:01 +01:00
Ilija Tovilo
b97dd3318d Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix expected output for bug52820.phpt
2026-03-19 13:18:54 +01:00
Ilija Tovilo
551809576b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix expected output for bug52820.phpt
2026-03-19 13:18:36 +01:00
Ilija Tovilo
b8b5fb074d Fix expected output for bug52820.phpt
Newer versions of curl seem to omit the "Closing connection ..." message. Make
the entire line optional.
2026-03-19 13:15:57 +01:00
Giovanni Giacobbi
103e35df7d ext/session: code refactoring - improve readability and consistency 2026-03-19 10:48:05 +00:00
Giovanni Giacobbi
d63fb997e2 ext/session: code cleanup - use single empty line except for sections 2026-03-19 10:48:05 +00:00
Giovanni Giacobbi
adba504ea8 ext/session: code cleanup - space after control flow keywords 2026-03-19 10:48:05 +00:00
Giovanni Giacobbi
3b20ccda19 ext/session: code cleanup - don't use tabs for alignments 2026-03-19 10:48:05 +00:00
Giovanni Giacobbi
a6802737b3 ext/session: code cleanup - use consistent pointer declarations 2026-03-19 10:48:05 +00:00
Giovanni Giacobbi
7b16f81651 ext/session: code cleanup - use tab for indent 2026-03-19 10:48:05 +00:00
Dmitry Stogov
db37779940 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21411: opcache_compile_file() fails to early-bind classes without parents (#21412)
2026-03-19 11:13:41 +03:00
Dmitry Stogov
aa9964eebb Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21411: opcache_compile_file() fails to early-bind classes without parents (#21412)
2026-03-19 11:13:30 +03:00
Rasmus Lerdorf
1a79ea47c5 Fix GH-21411: opcache_compile_file() fails to early-bind classes without parents (#21412) 2026-03-19 11:12:45 +03:00
Arshid
9b022c4c5c ext/standard: replace RETVAL_EMPTY_ARRAY() + return with RETURN_EMPTY_ARRAY() (#21464) 2026-03-18 05:30:03 +00:00
ndossche
a16ace8ee7 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21454: Missing write lock validation in SplHeap
2026-03-17 08:47:51 +01:00
ndossche
c9a6743b59 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21454: Missing write lock validation in SplHeap
2026-03-17 08:47:46 +01:00
ndossche
8796d75365 Fix GH-21454: Missing write lock validation in SplHeap
Closes GH-21448.
2026-03-17 08:47:20 +01:00
Dmitry Stogov
0b2d8136e3 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Update IR (#21462)
2026-03-16 22:55:26 +03:00
Dmitry Stogov
a5637221ee Update IR (#21462)
IR commit: 7fed7999743ba6a5ffc5535e786725d5577f6f34
2026-03-16 22:55:03 +03:00
Dmitry Stogov
c43880587b Update IR (#21462)
IR commit: 7fed7999743ba6a5ffc5535e786725d5577f6f34
2026-03-16 22:52:40 +03:00
Dmitry Stogov
0bd3a6b7f2 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix support for TAILCALL VM
  Fix GH-21267: JIT infinite loop on FETCH_OBJ_R with IS_UNDEF property (#21368)
2026-03-16 21:58:32 +03:00
Dmitry Stogov
00ff93d660 Fix support for TAILCALL VM 2026-03-16 21:57:40 +03:00
Dmitry Stogov
81504d3db7 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21267: JIT infinite loop on FETCH_OBJ_R with IS_UNDEF property (#21368)
2026-03-16 21:32:27 +03:00
Ilia Alshanetsky
e1a3a4c9a4 Fix GH-21267: JIT infinite loop on FETCH_OBJ_R with IS_UNDEF property (#21368)
When the JIT defers the IS_UNDEF check for FETCH_OBJ_R to the result
type guard, the deoptimization escape path dispatches to opline->handler
via the trace_escape stub. If opline->handler has been overwritten with
JIT code (e.g. a function entry trace), this creates an infinite loop.

Fix by dispatching to the original VM handler (orig_handler from the
trace extension) instead of going through the trace_escape stub. This
avoids the extra IS_UNDEF guard on every property read while correctly
handling the rare IS_UNDEF case during deoptimization.

Also set current_op_array in zend_jit_trace_exit_to_vm so that the
blacklisted exit deoptimizer can resolve orig_handler, covering the
case where side trace compilation is exhausted.

Closes GH-21368.
2026-03-16 21:31:49 +03:00
Alexandre Daubois
a8543dfdd2 Convert remaining zend_parse_parameters_none() to ZPP (#21343) 2026-03-16 09:28:08 +01:00
Ilija Tovilo
0039af028c Propagate bind error for stream_socket_server()
When stream_socket_server() fails during bind(), we're currently only showing
"Unknown error" in the error message. Properly propagate this error for better
diagnostics.

Closes GH-21328
2026-03-16 08:53:38 +01:00
Arshid
f44609c84d ext/standard: Remove unreachable break after RETURN_STRING (#21459) 2026-03-16 07:40:55 +00:00
Arshid
45157d24ea ext/zip: Remove unreachable break after RETURN_STRING (#21458) 2026-03-16 07:37:43 +00:00
Ilia Alshanetsky
4561e92fa1 Fix ReflectionMethod::invoke() for first class callables (#21389)
* Fix ReflectionMethod::invoke() crash with internal closures

The closure identity check added in GH-21366 accessed op_array.opcodes
unconditionally, but internal closures (e.g. var_dump(...)) use
internal_function, not op_array. This caused undefined behavior when
comparing closures created via first-class callable syntax on internal
functions.

Check the function type first: compare op_array.opcodes for user
closures, compare the function pointer directly for internal closures.

* Fix internal closure comparison and expand test coverage

The previous comparison (orig_func == given_func) could never match for
internal closures since zend_get_closure_method_def() returns a pointer
to each closure's embedded copy. Compare function_name and scope instead.

Also handle the mixed user/internal type case explicitly.

Add tests for: userland first-class callables, cloned internal closures,
and cross-type (user vs internal) closure rejection.

* php_reflection: Simplify the Closure::__invoke() check

---------

Co-authored-by: Tim Düsterhus <tim@bastelstu.be>
2026-03-14 17:00:04 -07:00
David Carlier
7e16d4e5f8 Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/gd: phpinfo() to be able to display libjpeg 10.0 support.
2026-03-14 18:24:55 +00:00
David Carlier
277a016723 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/gd: phpinfo() to be able to display libjpeg 10.0 support.
2026-03-14 18:24:17 +00:00
David Carlier
e257c086bb ext/gd: phpinfo() to be able to display libjpeg 10.0 support.
Fix #21431

Co-Authored-By: rainerjung

close GH-21432
2026-03-14 18:23:35 +00:00
Daniel Scherzer
91134db95d ReflectionFiber::getCallable(): remove stray backslash (#21439) 2026-03-14 10:11:33 -07:00
ndossche
c197fada93 Merge branch 'PHP-8.5'
* PHP-8.5:
  ext/zip: Fix const-generic compile warning
2026-03-14 15:07:26 +01:00
ndossche
e0ac74fb52 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  ext/zip: Fix const-generic compile warning
2026-03-14 15:07:06 +01:00
ndossche
b95f0ebc47 ext/zip: Fix const-generic compile warning 2026-03-14 15:06:57 +01:00
Tim Starling
605c0756c9 ext/zip: add ZipArchive::openString() method
Fixes to GH-14078:

* Rename ZipArchive::openBuffer() to ::openString().
* For consistency with ::open(), return int|bool, don't throw an
  exception on error. Provide error information via existing properties
  and accessors.
* Fix memory leak when ::openString() is called but ::close() is not
  called. Add test.
* Fix memory leak when a call to ::open() is followed by a call to
  ::openString(). Add test.
* Let libzip own the source, don't call zip_source_keep().
* Share buffer handling with ZipArchive::addFromString().

Elsewhere:

* If there is an error from zip_close() during a call to
  ZipArchive::open(), emit a warning but proceed to open the archive,
  don't return early. Add test.
* When buffers are saved by ZipArchive::addFromString(), release them
  in ZipArchive::close() and ::open(), don't accumulate buffers until
  the free_obj handler is called.
* Factor out buffer handling and reuse it in ZipArchive::openString()

Closes GH-21205.
Closes GH-14078.

Co-authored-by: Soner Sayakci <s.sayakci@shopware.com>
Co-authored-by: Ghaith Olabi <24876890+Gaitholabi@users.noreply.github.com>
2026-03-14 15:03:36 +01:00
Arshid
006f141dd6 ext/phar: Use zend_string_concat2 instead of manual zend_string_alloc/memcpy (#21441) 2026-03-14 14:28:00 +01:00
武田 憲太郎
31962aa086 ext/pgsql: Enable lo_tell64/lo_truncate64 by removing dead VE_PG_LO64 guards
The guards reference undefined VE_PG_LO64, a misspelling of
HAVE_PG_LO64 (removed in GH-14628), making the 64-bit code paths
permanently dead. Remove the guards to unconditionally enable the
64-bit variants for PostgreSQL >= 9.3, consistent with pg_lo_seek().

Dropped from GH-21386 as not suitable for backport.

close GH-21437
2026-03-14 05:22:43 +00:00
Arshid
a2fc8feb4c ext/openssl: openssl: use zend_string_init() instead of manual allocation (#21436) 2026-03-14 05:13:55 +00:00
Ilija Tovilo
92ba1e4ea0 Prevent closing of innerstream of php://temp stream
Fixes GH-21221
Closes GH-21222
2026-03-13 20:34:04 +01:00
Arshid
44d4f0e45a ext/soap: Use smart_str_appends() instead of smart_str_appendl(..., strlen(...)) (GH-21426) 2026-03-13 16:05:06 +01:00
Arshid
5ccaccda97 ext/reflection: Use smart_str_append instead of smart_str_appendl (#21413) 2026-03-12 17:14:03 -07:00
ndossche
e9b3ea82b5 Merge branch 'PHP-8.5'
* PHP-8.5:
  Fix GH-21083: Skip private_key_bits validation for EC/curve-based keys
2026-03-12 22:02:01 +01:00
ndossche
757dadcf1f Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  Fix GH-21083: Skip private_key_bits validation for EC/curve-based keys
2026-03-12 22:01:21 +01:00
Ilia Alshanetsky
7950482562 Fix GH-21083: Skip private_key_bits validation for EC/curve-based keys
openssl_pkey_new() checks private_key_bits >= 384 before generating any
key. For EC, X25519, ED25519, X448, and ED448 the size is inherent to
the curve or algorithm, so this check doesn't apply and causes failures
when default_bits is missing from openssl.cnf (which is the case in
OpenSSL 3.6's default config).

Skip the minimum-bits check for key types that don't use private_key_bits.

Closes GH-21387.
2026-03-12 21:53:22 +01:00
David CARLIER
b0aa6b9626 ext/soap: various optimisations
* replace strcat/strncpy with memcpy for pre-allocated buffers.
* remove redundant memset before struct copy.
2026-03-12 17:56:43 +00:00
ndossche
46357cbaaf dom: Merge declaration and assignment 2026-03-12 17:48:38 +01:00
ndossche
28c6659b06 dom: Simplify return value management of xpath callback 2026-03-12 17:48:38 +01:00