#
4bd63568 |
| 18-Jan-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix argument type of simplexml_import_dom (#13170) It needs to be "object". This is because first- and third-party extension can register custom node types using `php_libxml_register
Fix argument type of simplexml_import_dom (#13170) It needs to be "object". This is because first- and third-party extension can register custom node types using `php_libxml_register_export`. So we don't know upfront what types can be expected. This also changes the error to a TypeError everywhere.
show more ...
|
#
97267215 |
| 10-Jan-2024 |
David CARLIER |
general signatures discrepencies fixes (#13122)
|
#
f75931ad |
| 12-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault Move SimpleXML invalidation code after node checks This is safe, i.e. the tree hasn't been modified yet, bec
Fix GH-12929: SimpleXMLElement with stream_wrapper_register can segfault Move SimpleXML invalidation code after node checks This is safe, i.e. the tree hasn't been modified yet, because either we didn't call a libxml modification function yet, or xmlNewChild is called with a NULL pointer, which makes it bail out and return NULL. Closes GH-12947.
show more ...
|
#
8f9626c0 |
| 17-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Simplify php_sxe_count_elements_helper() by using non-destructive iterator reset
|
#
550ec298 |
| 16-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use php_sxe_reset_iterator_no_clear_iter_data() to avoid having to store and restore iterator data This makes the code less error-prone, and also makes it simpler.
|
#
695ec3c9 |
| 17-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove unnecessary _IS_BOOL case (#12230) This can never be executed because booleans are handled in a special case at the top of sxe_object_cast_ex().
|
#
0fee7201 |
| 16-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Simplify node check in simplexml
|
#
05c46b71 |
| 13-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Small optimization in php_sxe_get_first_node() by avoiding unwrapping iterator data (#12194)
|
#
bec1552a |
| 09-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove useless SKIP_TEXT() invokes (#12164) In the places I removed them, they were useless because there is already a type check for a single node type, so I found it confusing having t
Remove useless SKIP_TEXT() invokes (#12164) In the places I removed them, they were useless because there is already a type check for a single node type, so I found it confusing having them there.
show more ...
|
#
d18bab55 |
| 09-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Preallocate result array size in simplexml xpath This is the simplexml version of 4dea42a.
|
#
0ea268b5 |
| 09-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove obsolete libxml2 code LIBXML2_NEW_BUFFER is always defined since libxml2 2.9.0. That's the minimum version PHP requires, so it will always be defined.
|
#
efc73f24 |
| 07-Aug-2023 |
Ilija Tovilo |
Revert "Call cast_object handler from get_properties_for" This reverts commit 4182813ebffe0570e3741debd7da543df3517d0d.
|
#
4182813e |
| 30-Jun-2023 |
Ilija Tovilo |
Call cast_object handler from get_properties_for Fixes GH-11547 Closes GH-11583
|
#
dda42be9 |
| 26-Jun-2023 |
Vuudi <35967974+Vuudi@users.noreply.github.com> |
[skip ci] Fixed comment for SimpleXml function getName (#11537) Co-authored-by: David Huang <david.huang@check24.de>
|
#
d5ad7510 |
| 08-Jun-2023 |
George Peter Banyard |
More usage of known zend_str instead of C string (#11381)
|
#
ed097e30 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
No need for the double name pointer
|
#
47c277bd |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Use xmlStrEqual() instead of !xmlStrCmp() This actually shows the intent clearer, and also from the docs of xmlStrEqual: "Should be a bit more readable and faster than xmlStrcmp()".
|
#
79512794 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove double class entry variable
|
#
c6bffff9 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Remove dead code from sxe_get_element_by_name() retnode will never be set to anything other than NULL, because the branch is always taken if the names match.
|
#
c3f07973 |
| 02-Jun-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Implement iteration cache, item cache and length cache for node list iteration (#11330) * Implement iteration cache, item cache and length cache for node list iteration The current
Implement iteration cache, item cache and length cache for node list iteration (#11330) * Implement iteration cache, item cache and length cache for node list iteration The current implementation follows the spec requirement that the list must be "live". This means that changes in the document must be reflected in the existing node lists without requiring the user to refetch the node list. The consequence is that getting any item, or the length of the list, always starts searching from the root element of the node list. This results in O(n) time to get any item or the length. If there's a for loop over the node list, this means the iterations will take O(n²) time in total. This causes real-world performance issues with potential for downtime (see GH-11308 and its references for details). We fix this by introducing a caching strategy. We cache the last iterated object in the iterator, the last requested item in the node list, and the last length computation. To invalidate the cache, we simply count the number of modifications made to the containing document. If the modification number does not match what the number was during caching, we know the document has been modified and the cache is invalid. If this ever overflows, we saturate the modification number and don't do any caching anymore. Note that we don't check for overflow on 64-bit systems because it would take hundreds of years to overflow. Fixes GH-11308.
show more ...
|
#
7936c808 |
| 23-Jan-2023 |
Máté Kocsis |
Fix GH-8329 Print true/false instead of bool in error and debug messages (#8385)
|
#
abf4c116 |
| 12-Dec-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix getting the address of an uninitialized property of a SimpleXMLElement resulting in a crash Closes GH-12945.
|
#
b842ea4f |
| 28-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Apply SimpleXML iterator fixes only on master Many methods in SimpleXML reset the iterator when called. This has the consequence that mixing these operations with loops can cause infinit
Apply SimpleXML iterator fixes only on master Many methods in SimpleXML reset the iterator when called. This has the consequence that mixing these operations with loops can cause infinite loops, or the loss of iteration data. Some people may however rely on the resetting behaviour. To prevent unintended breaks in stable branches, let's only apply the fix to master. This reverts GH-12193, GH-12229, GG-12247 for stable branches while keeping them on master, adding a note in UPGRADING as well.
show more ...
|
#
82a84d0b |
| 23-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-12167 and GH-12169: Unable to get comment or processing instruction contents in SimpleXML Closes GH-12289.
|
#
1a4e401b |
| 19-Sep-2023 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix bug #55098: SimpleXML iteration produces infinite loop Closes GH-12247.
|