1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

133014 Commits

Author SHA1 Message Date
Peter Kokot c180e9b48a Remove unused call to Makefile.frag in ext/zip
The Makefile.frag has been removed in ext/zip.
2023-08-19 17:41:05 +02:00
ju1ius 7f1c3bf09b Adds support for DNF types in internal functions and properties (#11969)
Note that this does not add support for items generated by gen_stubs,
only for items registered dynamically via the Zend API.

Closes GH-10120
2023-08-19 00:11:06 +01:00
Niels Dossche 4ff93f779c Remove unnecessary invalidation from processing instructions
These invalidations only need to happen when elements are added,
removed, or manipulated. Processing instructions are not elements and
their contents are just text.
2023-08-18 18:06:04 +02:00
Kamil Tekiela ee82c94208 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix failing test on nightly
2023-08-17 18:46:28 +01:00
Kamil Tekiela 6d039d282a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix failing test on nightly
2023-08-17 18:45:49 +01:00
Kamil Tekiela ffd398b4fe Fix failing test on nightly 2023-08-17 18:45:10 +01:00
Ilija Tovilo 1b9ff16f92 Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove redundant condition
2023-08-17 18:55:51 +02:00
Ilija Tovilo d016c49cf5 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Remove redundant condition
2023-08-17 18:55:45 +02:00
Ilija Tovilo dd01c74a6f Remove redundant condition
Never refactor code just before pushing
2023-08-17 18:54:30 +02:00
Ilija Tovilo 48ede64506 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix segfault in format_default_value due to unexpected enum/object
2023-08-17 18:44:37 +02:00
Ilija Tovilo 9437aa9a8e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix segfault in format_default_value due to unexpected enum/object
2023-08-17 18:43:49 +02:00
Ilija Tovilo f78d1d0d10 Fix segfault in format_default_value due to unexpected enum/object
Evaluating constants at comptime can result in arrays that contain objects. This
is problematic for printing the default value of constant ASTs containing
objects, because we don't actually know what the constructor arguments were.
Avoid this by not propagating array constants.

Fixes GH-11937
Closes GH-11947
2023-08-17 18:43:11 +02:00
Kamil Tekiela 7e4ca2e8d9 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix implicit/explicit port in mysqlnd

Closes GH-11990
2023-08-16 20:34:48 +01:00
Kamil Tekiela 06bda99280 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix implicit/explicit port in mysqlnd
2023-08-16 20:33:52 +01:00
Kamil Tekiela c1103a9772 Fix implicit/explicit port in mysqlnd 2023-08-16 18:59:07 +01:00
Niels Dossche 2b61f71046 Add test for SimpleXMLElement::asXML() with a fragment and a filename 2023-08-16 08:27:43 +02:00
Ayesh Karunaratne 543eedf9e1 [skip-ci] minor typo fixes in UPGRADING and CONTRIBUTING.md (#11976) 2023-08-16 07:51:56 +02:00
Pierrick Charron baaa37ff78 Merge branch 'PHP-8.2'
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.11-dev
2023-08-15 16:10:02 -04:00
Pierrick Charron 4467f33e89 PHP-8.2 is now for PHP 8.2.11-dev 2023-08-15 16:08:52 -04:00
Eric Mann 32fa67331b Update NEWS for PHP 8.3.0beta3 2023-08-15 12:45:42 -07:00
Patrick Allaert 5713bc312a Merge branch 'PHP-8.2' 2023-08-15 21:10:25 +02:00
Patrick Allaert 6e8f5e091e Merge branch 'PHP-8.1' into PHP-8.2 2023-08-15 21:10:06 +02:00
Patrick Allaert 6e3f93f2f8 PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
Niels Dossche d46dc5694c Fix various namespace prefix conflict resolution bugs and namespace shift bugs
There are two linked issues:

- Conflicts couldn't be resolved by changing the prefix name.
- Lacking a prefix would shift the namespace as the default namespace,
  causing elements to suddenly become part of the namespace instead of
  the attributes.

The output could still be improved by removing redundant namespace
declarations, but that's another issue. At least the output is
correct now.

Closes GH-11777.
2023-08-15 20:42:42 +02:00
George Peter Banyard 82972f448f Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix various bugs related to DNF types
2023-08-15 17:01:51 +01:00
George Peter Banyard 02a80c5b82 Fix various bugs related to DNF types
- GH-11958: DNF types in trait properties do not get bound properly
 - GH-11883: Memory leak in zend_type_release() for non-arena allocated DNF types
 - Internal trait bound to userland class would not be arena allocated
 - Property DNF types were not properly deep copied during lazy loading

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
Co-authored-by: ju1ius <jules.bernable@gmail.com>
2023-08-15 15:34:33 +01:00
Niels Dossche 63a7f225ea Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix #81992: SplFixedArray::setSize() causes use-after-free
2023-08-14 21:38:36 +02:00
Niels Dossche 0b516aea25 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #81992: SplFixedArray::setSize() causes use-after-free
2023-08-14 21:34:04 +02:00
Niels Dossche b71c6b2c6c Fix #81992: SplFixedArray::setSize() causes use-after-free
Upon resizing, the elements are destroyed from lower index to higher
index. When an element refers to an object with a destructor, it can
refer to a lower (i.e. already destroyed) element, causing a uaf.
Set refcounted zvals to NULL after destroying them to avoid a uaf.

Closes GH-11959.
2023-08-14 21:32:22 +02:00
Kamil Tekiela 0b887042ae mysqli_field_seek return type changed to true (#11948) 2023-08-14 19:04:34 +01:00
Ayesh Karunaratne 27fb8d1c0c Fix DateTime exception hierarchy for DateInvalidTimeZoneException (#11970)
`DateInvalidTimeZoneException` is supposed to inherit from `DateException`, but the current stub has `Exception`.
2023-08-14 18:55:38 +02:00
Ilija Tovilo 09e63e4a09 Merge branch 'PHP-8.2'
* PHP-8.2:
  ci update freebsd image to the 13.2 image (#11110)
2023-08-14 16:30:23 +02:00
Ilija Tovilo 231a1f81c6 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ci update freebsd image to the 13.2 image (#11110)
2023-08-14 16:30:14 +02:00
David CARLIER 2012fd3f04 ci update freebsd image to the 13.2 image (#11110) 2023-08-14 16:30:01 +02:00
Niels Dossche 17b3af2958 GH-11964: In ext/date/php_date.stub.php, DateRangeError extends itself
According to the RFC[1] it's supposed to extend DateError.

[1] https://wiki.php.net/rfc/datetime-exceptions
2023-08-14 13:57:09 +02:00
Máté Kocsis 67ab2b7d87 Align the return type of snmp_set_oid_numeric_print() to its aliased funtion 2023-08-14 12:43:33 +02:00
Ilija Tovilo 7fcfaae006 Merge branch 'PHP-8.2'
* PHP-8.2:
  Use per-branch matrix for windows nightly
2023-08-14 11:42:26 +02:00
Ilija Tovilo e11b55d219 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Use per-branch matrix for windows nightly
2023-08-14 11:40:56 +02:00
Ilija Tovilo 902d39d57c Use per-branch matrix for windows nightly
I forgot this in the last PR.
2023-08-14 11:38:59 +02:00
Ilija Tovilo ee000ea186 Fix uouv on oom on object allocation
We may OOM during object initialization. In this case, free_obj needs to guard
against NULL values. There may be more cases where this is an issue, these were
the ones I was able to discover via script.

Fixes GH-11734
2023-08-14 11:10:00 +02:00
Cristian Rodríguez 2196e2299f Use zend_ast_size consistenly (#11955)
* opcache: use zend_ast_size helper in zend_persist_ast

* opcache: use zend_ast_size helper in zend_persist_ast_calc

* Zend: fix zend_ast_size definition

It is better not to use sizeof(struct_with_flexible_array)
and instead rely on offsetof(type, member) like most
other similar wrappers do.
2023-08-14 00:51:14 +02:00
Jorg Adam Sowa e56ed6e1ab BCmath extension code reformatting (#11896)
Re-formats the BCmath extension to have consistent formatting.

Mostly, it adds the spaces in calculations to have them more readable.

Also:

   -  removes unused headers
   -  removes few variables which are used only once in the code

Co-authored-by: George Peter Banyard <girgias@php.net>
2023-08-13 16:17:36 +01:00
Niels Dossche bb092ab4c6 Fix #80927: Removing documentElement after creating attribute node: possible use-after-free
Closes GH-11892.
2023-08-12 18:49:12 +02:00
Kamil Tekiela f907a009f9 Align highlight_string|file with HTML standard and modern browsers
Closes GH-11913
2023-08-12 15:08:28 +01:00
Kamil Tekiela 4a77a1ec08 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix error checking in mysqlnd
2023-08-10 15:26:14 +01:00
Kamil Tekiela 7a4b213c1f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix error checking in mysqlnd
2023-08-10 15:25:37 +01:00
Kamil Tekiela 0d922aa595 Fix error checking in mysqlnd
Closes GH-11925
2023-08-10 15:23:54 +01:00
Ilija Tovilo fad4ea1790 Merge branch 'PHP-8.2'
* PHP-8.2:
  Remove i386 Linux from push
2023-08-10 16:00:12 +02:00
Ilija Tovilo 241510c454 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Remove i386 Linux from push
2023-08-10 15:59:42 +02:00
Ilija Tovilo 248e6b0404 Remove i386 Linux from push
Testing this in nightly is sufficient. 32-bit problems are rare.

Closes GH-11922
2023-08-10 15:59:17 +02:00