1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Commit Graph

136226 Commits

Author SHA1 Message Date
Peter Kokot 028cfda994 Wrap clock_get_time check in AC_CACHE_CHECK (#14434)
The php_cv_func_clock_get_time cache variable enables cross-compiling
edge cases to manually override the AC_RUN_IFELSE check.
2024-06-02 19:02:12 +02:00
Gina Peter Banyard d2a932b8af Merge branch 'PHP-8.3'
* PHP-8.3:
  ext/standard: Fix test conflict with I/O tests
2024-06-02 17:03:57 +01:00
Gina Peter Banyard e206b68403 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/standard: Fix test conflict with I/O tests
2024-06-02 17:03:44 +01:00
Gina Peter Banyard 75f6132818 ext/standard: Fix test conflict with I/O tests
Closes GH-14428
2024-06-02 17:03:19 +01:00
Peter Kokot 5b35740098 Sync #if/ifdef/defined for LIBXML_EXPAT_COMPAT (#14435)
This one can be undefined or defined to value 1.
2024-06-02 15:39:42 +02:00
David CARLIER c8a8d8aba3 ext/intl last chunk of fast ZPP conversion (#14431) 2024-06-02 10:19:38 +01:00
David CARLIER 354b64720c ext/intl: calendar/locale use fast ZPP. (#14425) 2024-06-02 08:47:08 +01:00
David CARLIER 9437c32cf4 ext/intl: common use fast ZPP (#14422) 2024-06-01 22:33:12 +01:00
David CARLIER 8c08b03e9b ext/intl: odn, collator, msgformat using fast ZPP (#14421) 2024-06-01 22:25:00 +01:00
David CARLIER c39bcaa225 ext/int: UChar using fast ZPP (#14420) 2024-06-01 21:50:07 +01:00
Peter Kokot 8112889a73 Wrap ttyname_r check in AC_CACHE_CHECK (#14417)
This enables cross-compiling to set the php_cv_func_ttyname_r variable
for adjusting the configuration manually.

In case of cross-compiling the AC_CHECK_FUNCS is additionally used to
guess whether the target has the ttyname_r. Current platforms mostly
either have working ttyname_r compatible with POSIX or not.
2024-06-01 22:42:22 +02:00
David CARLIER bc6f3334d1 ext/intl: further fast ZPP usage. (#14419) 2024-06-01 20:48:55 +01:00
Niels Dossche 2f9de8b9e6 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix reference handling in SpoofChecker
2024-06-01 20:45:01 +02:00
Niels Dossche c87f29f685 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix reference handling in SpoofChecker
2024-06-01 20:40:17 +02:00
David CARLIER d005ab20ea ext/intl converter and formatter using fast ZPP (#14413) 2024-06-01 19:36:40 +01:00
Niels Dossche 5ec26edfb6 Fix reference handling in SpoofChecker
Closes GH-14414.
2024-06-01 20:35:57 +02:00
David CARLIER 694bb32119 ext/intl: timezone using fast ZPP and fixing SpoofChecker (#14415) 2024-06-01 19:16:03 +01:00
Peter Kokot 8b1bb91b3e Sync build system #if/ifdef/defined (#14397)
These are either undefined or defined to value 1:
- HAVE_CRYPT
- HAVE_CRYPT_H
- HAVE_UNISTD_H

Follow up of GH-5526 (-Wundef)
2024-06-01 19:26:38 +02:00
Peter Kokot ec50b178f1 Update ext/session spl dependency (#14410)
The spl dependency is configured so the spl_autoload_register is
available when session_start() is used, meaning the spl extension needs
to be loaded before the session. It is marked as optional to be more
explicit as spl is not directly used nor required in the session
extension.
2024-06-01 19:13:54 +02:00
David CARLIER 4fca8a6027 ext/intl: SpoofChecker using fast ZPP. (#14412) 2024-06-01 17:40:16 +01:00
Peter Kokot dedf8fbffd Add missing pcre dependency definition to zip extension (#14404)
The zip extension also requires the pcre extension.
2024-06-01 17:15:18 +01:00
Gina Peter Banyard 25a5146180 Clean-up unused headers (#14365)
* ext/mbstring.c: clean-up headers and include intrinsics
2024-06-01 17:12:42 +01:00
Gina Peter Banyard c3b3e90cea ext/odbc: Remove unused INI settings (#14399) 2024-06-01 17:06:34 +01:00
Peter Kokot f69c55b5b6 Remove hash dependency from session extension (#14409)
The session extension once depended on the hash extension for having
hash functions available when using the `session.hash_function` INI
directive. This directive was removed in PHP-7.1 via
3467526a65. At the time it could be marked
as optional dependency, because it only needed to be loaded before the
session in that case.

The removed ext/hash/php_hash.h in the ext/session/php_session.h might
cause BC break for PHP extensions if they rely on transitive include and
use hash extension in the code without explicitly including the
ext/hash/php_hash.h header. Solution is to include the
ext/hash/php_hash.h separately.
2024-06-01 17:06:17 +01:00
Niels Dossche ffe225d686 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug #76232: SoapClient Cookie Header Semicolon
2024-06-01 17:38:06 +02:00
Niels Dossche 98c8518b39 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #76232: SoapClient Cookie Header Semicolon
2024-06-01 17:38:00 +02:00
Niels Dossche 1b1677a8f1 Fix bug #76232: SoapClient Cookie Header Semicolon
According to RFC 6265 [1] the cookies must be separated by "; " not ";",
and it must not end with ";".

[1] https://datatracker.ietf.org/doc/html/rfc6265

Closes GH-14406.
2024-06-01 17:37:30 +02:00
Peter Kokot cf469133a5 Fix ZEND_DEBUG condition (#14408)
ZEND_DEBUG is always defined by the build system automatically, either
to value 0 or value 1.
2024-06-01 16:07:48 +02:00
Niels Dossche 9f89ada76f Struct-pack some soap datatypes (#14403)
While keeping data that belongs together close too.
2024-06-01 14:11:45 +02:00
David CARLIER 1e2306b4c6 ext/exif: moving few instances from memmove to memcpy. (#14400) 2024-06-01 13:05:49 +01:00
Niels Dossche 61191dc313 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
2024-06-01 13:32:58 +02:00
Niels Dossche d11a3c6579 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
2024-06-01 13:31:02 +02:00
Niels Dossche 476706165a Fix bug #69280: SoapClient classmap doesn't support fully qualified class name (#14398)
There's a hash table that maps type names to class name, but names with
a leading backslash are not supported. The engine has logic to strip
away the leading backslash that we should replicate here.

It works by checking if we need to make an actual copy in case an
unexpected (e.g. invalid data or leading backslash) situations are
detected. Upon making a copy we normalize the data in the table.

Furthermore, previously the code assumed that the key was always valid
and that the structure was a non-packed hash table. This isn't
necessarily the case. The new code fixes this as well.

Closes GH-14398.
2024-06-01 13:29:26 +02:00
Niels Dossche 8dc2391bae Fix bug #79701: getElementById does not correctly work with duplicate definitions
This is a long standing bug: IDs aren't properly tracked causing either
outdated or plain incorrect results from getElementById.

This PR implements a pragmatic solution in which we still try to use the
ID lookup table to a degree, but only as a performance boost not as a
"single source of truth". Full details are explained in the
getElementById code.

Closes GH-14349.
2024-06-01 12:55:05 +02:00
Bob Weinand 5fe799a4c6 Merge branch 'PHP-8.3' 2024-06-01 02:42:49 +02:00
Bob Weinand d98586b6ed Merge branch 'PHP-8.2' into PHP-8.3 2024-06-01 02:41:39 +02:00
Bob Weinand be7f3aa474 Fix GH-14387: Crash when stack walking in destructor of yielded from values during Generator->throw() 2024-06-01 02:38:55 +02:00
Niels Dossche 37f683a70f Remove unused internal functions in soap 2024-05-31 23:05:33 +02:00
Niels Dossche e8c6c6f15d Fix signedness issues in soap.c 2024-05-31 23:05:33 +02:00
Niels Dossche ca7a0df35e Make some things const that can be const in soap 2024-05-31 23:05:33 +02:00
Niels Dossche 7834bd1a59 Fix parameter name warning 2024-05-31 23:05:33 +02:00
David CARLIER 47c41d4a0f ext/sqlite: Sqlite3Stmt::bindParam/bindValue named parameters change. (#14393)
memmove seems unnecessary on `:` autoprepend.
2024-05-31 21:34:37 +01:00
Niels Dossche 62cdaac280 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix memory leaks with string function name lookups
2024-05-31 21:23:20 +02:00
Niels Dossche cac4290fb6 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leaks with string function name lookups
2024-05-31 21:23:13 +02:00
Niels Dossche 18233e0f2e Fix memory leaks with string function name lookups
There's a few leaks where the string is copied for lowercasing but not released.
Where possible, use the _lc functionality of zend_hash to do the lookup
to avoid the leaks that currently exist with the manual lowercasing.

Closes GH-14390.
2024-05-31 21:22:37 +02:00
Niels Dossche 59651ee722 Avoid string duplication in Soap function response (#14391) 2024-05-31 21:19:56 +02:00
Niels Dossche e4246433fb Fix signedness and argument order issues with argc handling in soap (#14389) 2024-05-31 21:16:21 +02:00
David Carlier e69bccd7c7 ext/pgsql: adding pg_socket_poll.
Using PQSocketPoll to poll on a connection's socket.
Returns immediatly is there no event expected on read and write.
Other than that, it is a thin wrapper on top of poll, thus reflecting
 its return value.

close GH-14366
2024-05-31 20:10:49 +01:00
Niels Dossche 3096c71594 Fix build warning in release mode
This isn't warned on by default, and can break the build if werror is
used.
2024-05-31 19:56:30 +02:00
Joshua Rüsweg e4a8d5b16f RFC: array_find (#14108)
see https://wiki.php.net/rfc/array_find
2024-05-31 19:39:12 +02:00