summaryrefslogtreecommitdiff
path: root/ext/dom/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-8.0'Christoph M. Becker2021-03-171-0/+19
|\ | | | | | | | | * PHP-8.0: Fix #66783: UAF when appending DOMDocument to element
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-171-0/+19
| |\ | | | | | | | | | | | | * PHP-7.4: Fix #66783: UAF when appending DOMDocument to element
| | * Fix #66783: UAF when appending DOMDocument to elementChristoph M. Becker2021-03-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the DOM standard, elements may only contain element, text, processing instruction and comment nodes[1]. It is also specified that a HierarchyRequestError should be thrown if a document is to be inserted[2]. We follow that standard, and prevent the use-after-free this way. [1] <https://dom.spec.whatwg.org/#node-trees> [2] <https://dom.spec.whatwg.org/#mutation-algorithms> Closes GH-6765.
* | | Promote DOM invalid state errors during property accessMáté Kocsis2021-03-168-24/+56
| | | | | | | | | | | | Closes GH-6780
* | | Merge branch 'PHP-8.0'Máté Kocsis2021-03-152-0/+4
|\ \ \ | |/ /
| * | Add missing skipif sections to ext/dom testsMáté Kocsis2021-03-152-0/+4
| | |
* | | Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-012-4/+4
| | | | | | | | | | | | | | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-242-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | * PHP-8.0: Fix potential file collision in dom tests Fix bug #80757 (Exit code is 0 when could not open file) Update NEWS
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-242-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix potential file collision in dom tests
| | * Fix potential file collision in dom testsNikita Popov2021-02-242-2/+2
| | |
* | | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-111-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* | Make createDocument() $namespace nullableNikita Popov2021-02-091-0/+1
| | | | | | | | | | | | According to the DOM specification, this argument should be nullable. It's also supposed to be a required argument, but not changing that at this point.
* | Make getElementsByTagNameNS $namespace nullableNikita Popov2021-02-091-0/+11
| | | | | | | | | | According to the DOM specification, this argument is supposed to be nullable.
* | Fix bug #80600 DOMChildNode::remove does not work on DOMCharacterData.Benjamin Eberlei2021-02-021-0/+11
| | | | | | | | Closes GH-6660
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-261-0/+24
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80268: loadHTML() truncates at NUL bytes
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-261-0/+24
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #80268: loadHTML() truncates at NUL bytes
| | * Fix #80268: loadHTML() truncates at NUL bytesChristoph M. Becker2020-10-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libxml2 has no particular issues parsing HTML strings with NUL bytes; these just cause truncation of the current text content, but parsing continues generally. Since `::loadHTMLFile()` already supports NUL bytes, `::loadHTML()` should as well. Note that this is different from XML, which does not allow any NUL bytes. Closes GH-6368.
* | | Make handling of NULL bytes in file paths more consistent (WIP)Dik Takken2020-09-298-24/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all extensions consistently throw exceptions when the user passes a path name containing null bytes. Also, some extensions would throw a ValueError while others would throw a TypeError. Error messages also varied. Now a ValueError is thrown after all failed path checks, at least for as far as these occur in functions that are exposed to userland. Closes GH-6216.
* | | Promote warnings to error in DOM extensionGeorge Peter Banyard2020-09-228-28/+78
| | | | | | | | | | | | Closes GH-5418
* | | Run tidyNikita Popov2020-09-181-2/+2
| | | | | | | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | | Improve error messages mentioning parameters instead of argumentsMáté Kocsis2020-09-094-4/+4
| | | | | | | | | | | | Closes GH-5999
* | | Fix #79968: Manipulation on unattached DOMChildNode should throw DOMExceptionBenjamin Eberlei2020-08-191-0/+17
| | |
* | | Add many missing closing PHP tags to testsMáté Kocsis2020-08-0918-0/+18
| | | | | | | | | | | | Closes GH-5958
* | | Fixed bug #79852Nikita Popov2020-07-141-0/+36
| | |
* | | Review the usage of apostrophes in error messagesMáté Kocsis2020-07-102-4/+4
| | | | | | | | | | | | Closes GH-5590
* | | Improve error messages for invalid property accessMáté Kocsis2020-05-182-4/+4
| | | | | | | | | | | | | | | Closes GH-5446 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Merge branch 'PHP-7.4'Nikita Popov2020-04-281-30/+0
|\ \ \ | | | | | | | | | | | | | | | | * PHP-7.4: Revert "Fix #79065: DOM classes do not expose properties to Reflection"
| * | | Revert "Fix #79065: DOM classes do not expose properties to Reflection"Nikita Popov2020-04-281-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6bc8f7e5a9949b2ba79376abd1ed13d0b4d0ae3c. This causes an assertion failure in PHPUnit.
* | | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-271-0/+30
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #79065: DOM classes do not expose properties to Reflection
| * | | Fix #79065: DOM classes do not expose properties to ReflectionChristoph M. Becker2020-04-271-0/+30
| |/ / | | | | | | | | | | | | We add a `get_properties` handler which complements the already existing `has_property` and `read_property`handlers.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-071-0/+17
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-04-071-0/+17
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
| | * Fix #78221: DOMNode::normalize() doesn't remove empty text nodesChristoph M. Becker2020-04-071-0/+17
| | | | | | | | | | | | | | | If a text node is not followed by another text node, we remove it, if its textContent is empty.
* | | Improve error messages of various extensionsMáté Kocsis2020-03-231-1/+1
| | | | | | | | | | | | Closes GH-5278
* | | Fix another memory leak in dom_zvals_to_fragment.Benjamin Eberlei2020-03-061-1/+5
| | |
* | | [RFC] Implement new DOM Living Standard APIs in ext/domBenjamin Eberlei2020-02-2821-3/+620
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-172-2/+19
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79271: DOMDocumentType::$childNodes is NULL
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-172-2/+19
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79271: DOMDocumentType::$childNodes is NULL
| | * Fix #79271: DOMDocumentType::$childNodes is NULLChristoph M. Becker2020-02-172-2/+19
| | | | | | | | | | | | | | | Dom level 2 core, DOM level 3 core and the DOM living standard agree that `childNodes` always return a `NodeList`, and never `null`.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-141-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix typo in recent bugfix
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-141-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix typo in recent bugfix
| | * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2020-02-141-1/+1
| | |\ | | | | | | | | | | | | | | | | * PHP-7.2: Fix typo in recent bugfix
| | | * Fix typo in recent bugfixChristoph M. Becker2020-02-141-1/+1
| | | |
* | | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-131-0/+14
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.4: Fix #77569: Write Acess Violation in DomImplementation
| * | | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-131-0/+14
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.3: Fix #77569: Write Acess Violation in DomImplementation
| | * | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2020-02-131-0/+14
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.2: Fix #77569: Write Acess Violation in DomImplementation
| | | * Fix #77569: Write Acess Violation in DomImplementationChristoph M. Becker2020-02-131-0/+14
| | | | | | | | | | | | | | | | We must not assume that the zval IS_STRING.
* | | | Fix stub for DomImplementation::createDocumentType()Nikita Popov2020-02-101-0/+13
| | | |
* | | | Fix ext/dom test helper method causing trailing whitespaces.Benjamin Eberlei2020-02-062-15/+12
| | | |
* | | | Reindent phpt filesNikita Popov2020-02-0338-180/+180
| | | |