Commit Graph

132811 Commits

Author SHA1 Message Date
jrfnl
78bfe682a5 [ci skip] PHP 8.3 Upgrading:
add missing PGSQL functions/constants

Follow up on 10868, which introduced these functions and constants.

add missing PGSQL visibility constants

Follow up on 10935, which introduced these constants.

Close GH-11838
2023-07-31 17:08:25 +01:00
jrfnl
a8fa0b54d8 [ci skip] PHP 8.3 Upgrading: fix pg_set_error_context_visibility typo
Ref: 21aaf3321f

Close GH-11837
2023-07-31 17:07:20 +01:00
jrfnl
c7cbe3764a [ci skip] PHP 8.3 Upgrading: add missing POSIX constants
Follow up on 10238 which added these constants.

Close GH-11835
2023-07-31 17:07:04 +01:00
Peter Kokot
37d35f5ed8
Move --enable/--disable-fiber-asm help output (#11827)
This moves the fiber configure option in the Zend section. TSRM doesn't
currently have any specific configure options so it can be removed from
the ./configure --help output.
2023-07-31 15:29:14 +01:00
Michael Orlitzky
605c60cd5f
Skip oci8 tests when no database is available (#11820)
Most oci8 tests fail out-of-the-box because a typical host won't have
an Oracle database instance available. Other database drivers like
mysqli and pgsql address this problem with an include file, inserted
into SKIPIF, that skips the test if no connection at all can be made.

This commits adds such a file (skipifconnectfailure.inc) for oci8, and
adds the corresponding SKIPIF to any tests that connect to a database.

Closes GH-11804

* ext/oci8/tests/lob_aliases.phpt: drop unnecessary SKIPIF.
2023-07-31 15:19:31 +01:00
Ilija Tovilo
82aa4253f1 Fix some uouv in ext/pgsql 2023-07-31 15:18:13 +02:00
Ilija Tovilo
322da7bcc3 Fix various uouv in intl 2023-07-31 15:18:13 +02:00
Ilija Tovilo
a145b40fa6 Fix uouv in password_needs_rehash() and password_hash() 2023-07-31 15:18:13 +02:00
Ilija Tovilo
2053af6628 Fix uouv in array_column
column_long and index_long might not be set, but are still used as arguments.
They are not actually used if column_str is set, but it's better to initialize
them anyway, if only to make MemorySanitizer happy.
2023-07-31 15:18:13 +02:00
Dmitry Stogov
79a8cf1b96 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fixed incorrect QM_ASSIGN elimination
2023-07-31 14:51:14 +03:00
Dmitry Stogov
91dc3e15e9 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fixed incorrect QM_ASSIGN elimination
2023-07-31 14:51:06 +03:00
Dmitry Stogov
b5f8a7270a Fixed incorrect QM_ASSIGN elimination
Fixes OSS Fuzz #60895
2023-07-31 14:50:13 +03:00
Ilija Tovilo
7364b7bc0b
Fix uaf of MBSTRG(all_encodings_list)
We need to remove the value from the GC buffer before freeing it. Otherwise
shutdown will uaf when running the gc. Do that by switching from
zend_hash_destroy to zend_array_destroy, which should also be faster for freeing
members due to inlining of i_zval_ptr_dtor.

Closes GH-11822
2023-07-31 13:31:50 +02:00
Niels Dossche
655f116be5 XLEAK XML_SAVE_NO_DECL test for old libxml2 versions 2023-07-29 17:42:31 +02:00
Niels Dossche
ae66a0d142 Corrections to return type of loading DOM documents 2023-07-29 14:58:01 +02:00
George Peter Banyard
b389846d05
ext/mysqli: Remove catchable fatal error handler
Recoverable fatal error haven't been a thing for a while, and proper fatal error have never been catchable
2023-07-29 06:17:20 +01:00
George Peter Banyard
8582d97b8c
ext/mysqli: Stop using global variable in connection test helper 2023-07-29 06:17:20 +01:00
George Peter Banyard
0c21715935
ext/mysqli: Remove conditional function declaration 2023-07-29 06:17:20 +01:00
George Peter Banyard
17a80eb08b
ext/mysqli: Remove custom sys_get_temp_dir() function
It has existed since PHP 5.2.1...
2023-07-29 06:17:19 +01:00
tekimen
092726fb1e
Fix GH-11785: '++nothing+crc' is not a recognized feature for M1 / M2 macOS compile target (#11796)
#pragma GCC target("+nothing+crc") is means clear outs aarch64_isa_flags.

However, #pragma clang attribute push(__attribute__((target("+nothing+crc") is not means any, then displays ignore feature. (Not reproduce Linux on ARM (ex: Raspberry Pi))

Therefore, Add new #pragma when compiling on M1/M2 macOS.
2023-07-29 06:00:47 +01:00
Remi Collet
ae3646db48
use typed constants in 8.3 2023-07-28 15:56:42 +02:00
Remi Collet
0893b4bed5
add ZipArchive::LENGTH_TO_END and ZipArchive::LENGTH_UNCHECKED constants 2023-07-28 15:56:31 +02:00
Máté Kocsis
566cf37ec3
Use new class synopsis generating markup (#11809) 2023-07-28 15:42:32 +02:00
Ilija Tovilo
585bdf2992
Merge branch 'PHP-8.2'
* PHP-8.2:
  Replace xfail with skipif in calendar_clear_variation1.phpt
2023-07-27 12:30:34 +02:00
Ilija Tovilo
5d90c5057d
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Replace xfail with skipif in calendar_clear_variation1.phpt
2023-07-27 12:30:27 +02:00
Ilija Tovilo
6b6a5cd28e
Replace xfail with skipif in calendar_clear_variation1.phpt
Fixes GH-11128
Closes GH-11801
2023-07-27 12:29:49 +02:00
Ilija Tovilo
4077dad871
[skip ci] Hide generated files from diff via .gitattributes (#11802) 2023-07-26 19:18:01 +02:00
Niels Dossche
3b68e84341 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix DOM test
2023-07-26 18:05:56 +02:00
Niels Dossche
9a358b2842 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix DOM test
2023-07-26 18:05:51 +02:00
Niels Dossche
bed0e54104 Fix DOM test 2023-07-26 18:05:24 +02:00
Niels Dossche
4bee5743e9 Fix GH-11792: LIBXML_NOXMLDECL is not implemented or broken
Fixes GH-11792.
Closes GH-11794.
2023-07-26 18:02:36 +02:00
Niels Dossche
8ac0dcc632 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11791: Wrong default value of DOMDocument::xmlStandalone
2023-07-26 17:26:14 +02:00
Niels Dossche
86580c6624 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11791: Wrong default value of DOMDocument::xmlStandalone
2023-07-26 17:23:45 +02:00
Niels Dossche
bf4e7bd3ed Fix GH-11791: Wrong default value of DOMDocument::xmlStandalone
At one point this was changed from a bool to an int in libxml2, with
negative values meaning it is unspecified. Because it is cast to a bool
this therefore returned true instead of the expected false.

Closes GH-11793.
2023-07-26 17:20:10 +02:00
Jorg Adam Sowa
549c657897
Fix GH-11761: Bcmath numbers with trailing zeros (#11798) 2023-07-26 13:48:50 +01:00
Derick Rethans
7273349a1f Merge remote-tracking branch 'derickr/create-from-iso-string-immutable' 2023-07-25 18:44:26 +01:00
Derick Rethans
82ff4c5e84 Make the new DatePeriod::createFromISO8601String method emit DateTimeImmutable objects 2023-07-25 18:43:45 +01:00
Derick Rethans
b669cb4c1b CS 2023-07-25 18:43:45 +01:00
Ilija Tovilo
4182813ebf
Call cast_object handler from get_properties_for
Fixes GH-11547
Closes GH-11583
2023-07-25 17:59:44 +02:00
Ilija Tovilo
127ad70782
Fix open_basedir leak
Fixes oss-fuzz #60741
Closes GH-11780
2023-07-25 17:54:14 +02:00
Ilija Tovilo
61d16a6501
[skip ci] Don't render zend_vm_handlers.h in PRs 2023-07-25 16:10:07 +02:00
Niels Dossche
5da08dfff1 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix empty argument cases for DOMParentNode methods
  Fix DOMCharacterData::replaceWith() with itself
  Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS()
  Fix DOMEntity field getter bugs
2023-07-24 19:05:16 +02:00
Niels Dossche
e76b62bcb2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix empty argument cases for DOMParentNode methods
  Fix DOMCharacterData::replaceWith() with itself
  Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS()
  Fix DOMEntity field getter bugs
2023-07-24 19:01:22 +02:00
Niels Dossche
abb1d2e824 Fix empty argument cases for DOMParentNode methods
Closes GH-11768.
2023-07-24 18:58:39 +02:00
Niels Dossche
1cf2d216a2 Fix DOMCharacterData::replaceWith() with itself
Previously, when replacing the node with itself (or contained within
itself), the node disappeared.

Closes GH-11770.
2023-07-24 18:58:17 +02:00
Niels Dossche
168bc8146f Fix incorrect attribute existence check in DOMElement::setAttributeNodeNS()
Closes GH-11776.
2023-07-24 18:57:16 +02:00
Niels Dossche
d439ee18ed Fix DOMEntity field getter bugs
- publicId could crash PHP if none was provided
- notationName never worked

The fields of this classs were untested. This new test file changes that.

Closes GH-11779.
2023-07-24 18:55:51 +02:00
George Peter Banyard
f6cdfd5b52
[skip ci] Add myself to CODEOWNER for BCMath extension 2023-07-24 17:09:54 +01:00
George Peter Banyard
68247c02d5
Refactor BCMath bundledlib and extension (#10774)
* ext/bcmath: coding style: use indentation

And add braces to block statements, as the current code was pretty much unreadable with how inconsistent it was.

* ext/bcmath: Remove some useless header inclusions

* ext/bcmath: Use standard C99 bool type instead of char

* ext/bcmath: Include specific headers instead of config.h

* Restructure definitions to reduce header inclusions

* Use size_t as a more appropriate type

* Remove unused variable full_scale

* Refactor bc_raisemod() to get rid of Zend dependencies

This separates the concerns of throwing exceptions back into the PHP_FUNCTION instead of being the responsibility of the library

* Refactor bc_raise() to get rid of Zend dependencies

This separates the concerns of throwing exceptions back into the PHP_FUNCTION instead of being the responsibility of the library

* Refactor bc_divmod() and bc_modulo() to return bool

Return false on division by 0 attempt instead of -1 and true on success instead of 0

* Refactor bc_divide() to return bool

Return false on division by 0 attempt instead of -1 and true on success instead of 0
2023-07-24 16:42:34 +01:00
Niels Dossche
0f20527768
Simplify configuration getters (#11778)
dom_get_doc_props_read_only() already does a NULL check.
2023-07-24 17:17:12 +02:00