Commit Graph

1034 Commits

Author SHA1 Message Date
Máté Kocsis
2f7309b1e9
Use RETURN_THROWS() during ZPP in the date, dba and dom extensions 2019-12-31 00:21:37 +01:00
Benjamin Eberlei
f905a81979 ext/dom: Replace usages of PHP_FUNCTION and aliases with PHP_METHOD. 2019-11-09 21:29:42 +01:00
Benjamin Eberlei
4253ca486d Convert ext/dom to use arginfo stub. 2019-11-08 15:05:35 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Christoph M. Becker
4008704f62 zend_parse_parameters_throw() is obsolete
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
2019-11-01 16:47:15 +01:00
Máté Kocsis
2204dbde3b Add missing ZPP checks
Closes GH-4878.
2019-11-01 15:26:52 +01:00
Christoph M. Becker
32d3dbf789 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:10:18 +01:00
Christoph M. Becker
db14b78099 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:09:38 +01:00
Christoph M. Becker
e175a0a1c8 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test cases for libxml2 2.9.10
2019-10-31 16:08:38 +01:00
Christoph M. Becker
e29922f054 Fix test cases for libxml2 2.9.10
Since the error reporting has been slightly changed, we have to adapt
the two affected test cases.
2019-10-31 16:07:34 +01:00
Nikita Popov
504f7ffdd6 Small ext/dom cleanups 2019-10-29 11:16:23 +01:00
Fabien Villepinte
8a88f72beb Merge branch 'PHP-7.4' 2019-10-26 16:08:00 +02:00
Fabien Villepinte
601aef3468 Replace EXPECTF by EXPECT
In ext/dom all the tests with a EXPECTF section
starting by "Fatal error: Uncaught" have been updated
to use the faster EXPECT
2019-10-26 16:05:02 +02:00
Fabien Villepinte
23f3b54906 Merge branch 'PHP-7.4' 2019-10-19 15:44:57 +02:00
Fabien Villepinte
550a2df043 Add tests for DOMEntityReference 2019-10-19 15:42:16 +02:00
Fabien Villepinte
3d22c80fc2 Test an error case with DOMDocument::createEntityReference 2019-10-15 21:56:44 +02:00
Nikita Popov
c9d4696f76 Merge branch 'PHP-7.4' 2019-10-07 16:32:42 +02:00
Nikita Popov
f085bddb51 Fix number of required arguments in arginfo
* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
  despite what the docs say...
2019-10-07 16:32:11 +02:00
Benjamin Eberlei
6c963694b1 ext/dom: Add global registerNodeNS flag on DOMXPath ctor and property. 2019-10-05 18:56:58 +02:00
Nikita Popov
2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov
01fc1a3057 Remove most uses of the ERROR type
It is now only used to signal exceptions for property reads. ERROR
zvals are never returned back to the VM anymore, so there's no
need to check for them when receiving a VAR.

Also return MAY_BE_ERROR, as ERROR is now no longer relevant for
inference.
2019-09-30 11:35:07 +02:00
Nikita Popov
a66c60cce3 Throw Error when writing property of non-object
This removes object auto-vivification support.

This also means that we can remove the corresponding special
handling for typed properites: We no longer need to check that a
property is convertible to stdClass if such a conversion might
take place indirectly due to a nested property write.

Additionally OBJ_W style operations now no longer modify the
object operand, and as such we no longer need to treat op1 as a
def in SSA form.

The next step would be to actually compile the whole LHS of OBJ_W
operations in R rather than W mode, but that causes issues with
SimpleXML, whose object handlers depend on the current compilation
structure.

Part of https://wiki.php.net/rfc/engine_warnings.
2019-09-27 10:11:47 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Benjamin Eberlei
cece939526 Cleanup ext/dom: Additional unimplemented code following 25bfac4 2019-09-23 19:28:55 +02:00
Benjamin Eberlei
25bfac44b0 Cleanup ext/dom: Removal of unimplemented dummy classes.
The following classes were registered in ext/dom but
neither documented nor had any behavior (only test data).
These classes are now removed:

- DOMNameList
- DomImplementationList
- DOMConfiguration
- DomError
- DomErrorHandler
- DOMImplementationSource
- DOMLocator
- DOMUserDataHandler
- DOMTypeInfo
2019-09-17 23:45:06 +02:00
Christoph M. Becker
aa7308e0a8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing SKIPIF
2019-09-04 08:36:39 +02:00
Fabien Villepinte
c0c1f9d38c Add missing SKIPIF 2019-09-04 08:36:11 +02:00
twosee
63171d88f2 Add do...while(0) for RETURN_* and ZVAL_* APIs
Closes GH-4255.
2019-06-12 16:17:16 +02:00
Dmitry Stogov
e029cc4dd4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Dmitry Stogov
b2cdde0826 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
2019-05-28 20:19:15 +03:00
Dmitry Stogov
83804519df Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros 2019-05-28 20:10:02 +03:00
Christoph M. Becker
4b7c2de141 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:33:23 +02:00
Christoph M. Becker
d3c95db18c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:32:53 +02:00
Christoph M. Becker
fd607635a4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:32:13 +02:00
Christoph M. Becker
e246dea9fe Fix #78025: segfault when accessing properties of DOMDocumentType
Instead of following the NULL pointer, we return an empty string.
2019-05-17 13:31:18 +02:00
Peter Kokot
2cf90bb2f0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d Normalize comments in *nix build system m4 files
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
  favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Nikita Popov
d9ec9a919c Merge branch 'PHP-7.4' 2019-04-18 13:08:27 +02:00
Hugh McMaster
9f0c9b7ad6 Rename --enable-libxml to --with-libxml to meet naming guidelines 2019-04-18 13:08:02 +02:00
Hugh McMaster
cc930cdd75 Use PKG_CHECK_MODULES to detect libxml2 2019-04-18 13:04:54 +02:00
Hugh McMaster
29d1b7fd52 Remove support for --with-libxml-dir 2019-04-18 13:04:54 +02:00
Peter Kokot
6426420f61 Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace dirname(__FILE__) by __DIR__ in tests
2019-03-15 23:36:47 +01:00
Fabien Villepinte
26dfce7f36 Replace dirname(__FILE__) by __DIR__ in tests 2019-03-15 22:55:30 +01:00
Peter Kokot
d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Nikita Popov
ae59537d84 Merge branch 'PHP-7.4' 2019-03-05 10:24:38 +01:00
Nikita Popov
b26df0e395 Remove tests for zpp failure conditions
These tests only check zpp error conditions, so drop them per
zpp testing policy.
2019-03-05 10:22:23 +01:00
Nikita Popov
c8e2b333cb Merge branch 'PHP-7.4' 2019-02-20 11:22:31 +01:00
Nikita Popov
c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Nikita Popov
879cd04913 Merge branch 'PHP-7.4' 2019-02-18 17:51:41 +01:00
Tyson Andre
9249d82019 Fix typos in code comments [skip ci] 2019-02-18 17:48:12 +01:00
Nikita Popov
29aa080f0d Merge branch 'PHP-7.4' 2019-02-18 15:31:15 +01:00
Andrea Faulds
39792f5bb7 run-tests.php: experimental parallel testing support 2019-02-18 14:58:53 +01:00
Dmitry Stogov
91ef4124e5 Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s). 2019-02-04 13:20:25 +03:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +02:00
Nikita Popov
6c73b50cf6 Remove static calls to non-static methods 2019-01-30 09:19:02 +01:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Dmitry Stogov
0f7f1498be Use ZEND_THIS macro to hide implementation details in extensions code. 2018-11-15 19:54:19 +03:00
Dmitry Stogov
54a7d03934 Replace zend_parse_method_parameters() by zend_parse_parameters() and avoid useless checks. 2018-11-14 03:32:19 +03:00
Dmitry Stogov
c6ad0b92b7 Replace getThis() by EX(This), when additional check is not necessary. 2018-11-14 02:44:25 +03:00
Peter Kokot
d679f02295 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:33:09 +02:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:56:38 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
f116484cf1 Rename *.php files in ext/dom tests to *.inc
*.php files are ignored by Git and a better practice might be to rename
PHP included files for tests.
2018-09-23 17:22:55 +02:00
Nikita Popov
74235ca5f3 Bump minimum libxml version to 2.7.6
Released Oct 2009, part of RHEL 6.
2018-09-23 15:51:09 +02:00
Peter Kokot
bfa2c7158f Fix permissions
Certain files don't need to be executables.
2018-09-21 14:12:25 +02:00
Christoph M. Becker
95178b19b2 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix SKIPIF conditions
2018-08-28 14:02:44 +02:00
Christoph M. Becker
441b6a6f5e Fix SKIPIF conditions
The test calls `mb_convert_encoding()` and as such requires the
mbstring extension.
2018-08-28 14:02:11 +02:00
Anatol Belski
3cb4db913d Merge branch 'PHP-7.3'
* PHP-7.3:
  Add test for bug #76738
2018-08-17 18:38:07 +02:00
Anatol Belski
990a404c2d Add test for bug #76738
Original repro. It's unwieldy, but it's otherwise hard to trigger
the wrong buffer handling behavior.
2018-08-17 18:31:58 +02:00
Anatol Belski
084837f274 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix memory leak
2018-08-17 16:23:27 +02:00
Anatol Belski
0414fff205 Fix memory leak 2018-08-17 16:22:35 +02:00
Anatol Belski
0c2327b472 Cleanup
(cherry picked from commit 8b3174f256)
2018-08-17 13:01:57 +02:00
Anatol Belski
ddd73d4fa8 Followup fix for ef9ed19e, see also bug #76738
(cherry picked from commit 083285f22a)
2018-08-17 13:01:56 +02:00
Xinchen Hui
10d724d82d Fixed build
(cherry picked from commit 36f05a80d7)
2018-08-17 13:01:55 +02:00
Andrew Nester
2072d377d3 DOMDocument::formatOutput attribute sometimes ignored
(cherry picked from commit ef9ed19ec7)
2018-08-17 13:01:55 +02:00
Anatol Belski
8b3174f256 Cleanup 2018-08-14 14:33:19 +02:00
Anatol Belski
083285f22a Followup fix for ef9ed19e, see also bug #76738 2018-08-14 14:16:13 +02:00
Christoph M. Becker
819cf5283b Revert "DOMDocument::formatOutput attribute sometimes ignored"
This reverts commit ef9ed19ec7 and its
follow-up 36f05a80d7, since these caused
a serious regression (see bug #76738).
2018-08-14 12:14:33 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Peter Kokot
a5e80b22e1 Fix typos in code comments 2018-07-25 11:57:11 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Anatol Belski
90edf754c5 Merge branch 'PHP-7.2'
* PHP-7.2:
  Sync callback signature with libxml2 2.9.8
2018-07-09 21:25:19 +02:00
Anatol Belski
474292c3e4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync callback signature with libxml2 2.9.8
2018-07-09 21:24:51 +02:00
Anatol Belski
a820aab9da Sync callback signature with libxml2 2.9.8 2018-07-09 21:21:41 +02:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Xinchen Hui
a6467af8a5 Fixed test skip 2018-07-04 11:20:28 +08:00
Xinchen Hui
36f05a80d7 Fixed build 2018-07-04 11:15:32 +08:00
Andrew Nester
ef9ed19ec7 DOMDocument::formatOutput attribute sometimes ignored 2018-06-28 10:38:20 +02:00
Dusta
da82719f20
Update http to https 2018-06-25 08:31:32 +02:00
Dmitry Stogov
f2b4ec4bdc Export standard object handlers, to avoid indirect access 2018-05-31 11:57:22 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Dmitry Stogov
1af60a2a71 Keep initialized object_handlers structures in read-only memory. 2018-03-14 14:01:45 +03:00
Gabriel Caruso
701437a948
Remove return types from some magic method in protos
__construct, __destruct, __wakeup does not have return types defined.
2018-03-09 12:04:46 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov
ede663f381 Convert iterator by reference errors to exceptions
I'm using RuntimeException in SPL, because other SPL classes that
throw this error used it. Error is used for everything else, because
that's what core does.
2018-02-19 21:58:56 +01:00
Gabriel Caruso
079598a85d
Use zend_parse_parameters_none_throw 2018-02-18 09:36:35 +01:00
Anatol Belski
f4705b77ff Merge branch 'PHP-7.2'
* PHP-7.2:
  Remove duplicated assignment
2018-02-17 13:13:17 +01:00
Anatol Belski
0255c21319 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove duplicated assignment
2018-02-17 13:12:29 +01:00
Anatol Belski
a468752e53 Remove duplicated assignment 2018-02-17 13:10:59 +01:00
Joe
47b90e910b
Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixes bug #75871 Use pkg-config for libxml2 if available
2018-02-08 10:51:47 +01:00
Joe
f9a16d492e
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixes bug #75871 Use pkg-config for libxml2 if available
2018-02-08 10:51:07 +01:00
Pedro Magalhães
5673c641dc
Fixes bug #75871 Use pkg-config for libxml2 if available 2018-02-08 10:50:22 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Gabriel Caruso
b0d3c1bf83 Add and fix SKIPIF sections 2018-02-04 17:26:37 +01:00
Gabriel Caruso
affc20f891 Use bool instead of boolean in proto 2018-02-04 17:00:24 +01:00
Gabriel Caruso
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Peter Kokot
2783b1c823 Remove outdated TODO files
Some extensions included TODO files that has been present for several
years in the repository tree without changes. This included:

- ext/phar
- ext/intl
- ext/zip
- ext/soap
- ext/pdo
- ext/spl
- ext/dom
- ext/gmp
- ext/xmlwriter
- ext/xmlreader

ext/phar feature request has been created instead, and for others it
would be better to use wiki and RFC workflow instead based on current
feature requests and further PHP development requirements.

[ci skip]
2017-12-09 19:18:58 +01:00
Nikita Popov
dcdd4abdb2 Make sure properties are initialized before cloning
Now that they are not memset, they need to be explicitly intialized,
as zend_objects_clone_members() destroys the old property values
first.
2017-11-25 22:51:37 +01:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Dmitry Stogov
e2589b7d02 Use interned strings for "magic" property of internal classes. (not copyied into SHM) 2017-11-01 19:04:54 +03:00
Dmitry Stogov
fad75a54d4 Merge branch 'master' into rc_debug
* master: (26 commits)
  Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
  Fix compiler warnings
  We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
  Remove these old comments, as for the TODO, there is already a FR for this
  Re-enable AppVeyor cache
  make sure run-tests reports exit status upon prerequisite error
  Remove implicit constants from test case
  Fix invalid read in zend_use_undefined_constant()
  Fix invalid read in mb_ord()
  Remove --with-libmbfl configure option
  Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
  Add tests for UConverter::getStandards()
  convert spaces to tabs in ext/ftp/tests/server.inc
  Add tests for ftp_rename
  Fix bug #75434 Wrong reflection for mysqli_fetch_all function
  Don't optimize input arrays with suffix holes
  Fix bug #75307 Wrong reflection for openssl_open function
  ...
2017-10-30 12:11:35 +03:00
Dmitry Stogov
2065d51a18 Better fix for bug #75451 (Assertion fails while foreach on empty xpath query) 2017-10-30 12:04:15 +03:00
Xinchen Hui
1a9e64362c Fixed bug #75451 (Assertion fails while foreach on empty xpath query) 2017-10-28 21:38:26 +08:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
9cf87aa196 Avoid HashTable allocations for empty arrays (using zend_empty_array). 2017-10-24 17:27:31 +03:00
Peter Kokot
60909f391d Remove code examples from dom extension
PHP documentation is a better place to present code examples. Tests
for ext/dom already include all used PHP code.
2017-10-08 17:50:17 +02:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00
Anatol Belski
45613b3473 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix test compat with libxml2 2.9.5
2017-09-11 14:35:51 +02:00
Anatol Belski
b5d7663444 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix test compat with libxml2 2.9.5
2017-09-11 14:35:24 +02:00
Anatol Belski
3549d9184a Fix test compat with libxml2 2.9.5
From 2.9.5 on libxml explcitly initializes the keepBlanks flag.
2017-09-11 14:32:54 +02:00
Xinchen Hui
9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Andreas Treichel
f725d9b1b9 Implement Countable for DomNodeList and DOMNamedNodeMap (Request #74837) 2017-07-10 08:48:10 +02:00
Nikita Popov
d9886614dc Merge branch 'PHP-7.1' 2017-06-03 00:42:38 +02:00
Nikita Popov
d9fd44366d Merge branch 'PHP-7.0' into PHP-7.1 2017-06-03 00:42:30 +02:00
Tim Toohey
d027bc2add Fixed bug #69373
xmlNodeSetContentLen() calls xmlFreeNode() on node->children. This
causes problems if there are other references around to those children.
2017-06-03 00:40:58 +02:00
Remi Collet
a1bd34b31c Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74416 Wrong reflection on DOMNode::cloneNode
2017-04-13 07:07:56 +02:00
Remi Collet
77e3fef64f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74416 Wrong reflection on DOMNode::cloneNode
2017-04-13 07:07:43 +02:00
Fabien Villepinte
bc4bb7882b Fixed bug #74416 Wrong reflection on DOMNode::cloneNode 2017-04-13 07:07:24 +02:00
Nikita Popov
859a6505d3 Merge branch 'PHP-7.1' 2017-03-02 12:36:31 +01:00
Nikita Popov
bf8c463f5b Merge branch 'PHP-7.0' into PHP-7.1 2017-03-02 12:36:13 +01:00
somedaysummer
fab5ce347c PHP bug #74004
Fix for DOMDocument loadHTML and loadHTMLFile ignore LIBXML_NOWARNING
and LIBXML_NOERROR flags.
2017-03-02 12:35:42 +01:00
Nikita Popov
6ba7206620 Deprecate assert() with string argument 2017-02-03 21:02:52 +01:00
Nikita Popov
000b504b51 Merge branch 'PHP-7.1' 2017-02-03 18:42:33 +01:00
Nikita Popov
f3b1ecb6c8 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-03 18:42:28 +01:00
Nikita Popov
dcaf4da8a6 Revert "Merge branch 'pull-request/2344' into PHP-7.0"
This reverts commit 6988d070ea, reversing
changes made to 75ad2b301a.
2017-02-03 18:42:10 +01:00
Joe Watkins
984a6312e4
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML
2017-02-03 06:13:40 +00:00
Joe Watkins
611952cd98
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML
2017-02-03 06:12:42 +00:00
somedaysummer
4df993d89d
Fixed bug #74004 LIBXML_NOWARNING (etc) ignored by DOMDocument::loadHTML 2017-02-03 06:08:42 +00:00
Anatol Belski
ac16d944bb Merge branch 'PHP-7.1'
* PHP-7.1:
  remove the reverted NEWS entry
  sync NEWS with the reverted stuff
  Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
  Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
2017-02-01 20:07:07 +01:00
Anatol Belski
3bc7ea9a0a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  sync NEWS with the reverted stuff
  Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
  Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
2017-02-01 20:01:40 +01:00
Anatol Belski
3446e3b749 Revert "fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)"
This reverts commit 2fcf1259c6.
2017-02-01 19:59:24 +01:00
Anatol Belski
69a2e4ece2 Revert "fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)"
This reverts commit 62938bf088.
2017-02-01 19:59:18 +01:00
Joe Watkins
82d363c21b
Merge branch 'PHP-7.1'
* PHP-7.1:
  fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)
2017-01-30 11:26:51 +00:00
Joe Watkins
e6bc4f39a2
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454)
2017-01-30 11:26:37 +00:00
jhdxr
62938bf088
fix BC break introduced by #2346 (sebastianbergmann/phpunit#2454) 2017-01-30 11:25:04 +00:00
Joe Watkins
3de7b2ab52
Merge branch 'PHP-7.1'
* PHP-7.1:
  fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)
2017-01-28 08:28:31 +00:00
Joe Watkins
366f838483
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed bug #50989 (DOM support for LIBXML_NOXMLDECL)
2017-01-28 08:27:53 +00:00
jhdxr
2fcf1259c6
fixed bug #50989 (DOM support for LIBXML_NOXMLDECL) 2017-01-28 08:27:05 +00:00
Joe Watkins
b8f1c798fc
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
  Added (failing) testcase for bug #54382
2017-01-25 20:59:52 +00:00
Joe Watkins
f6f2855ecd
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
  Added (failing) testcase for bug #54382
2017-01-25 20:59:37 +00:00
Arnout Boks
721a189742
Fix bug #54382 (getAttributeNodeNS doesn't get xmlns* attributes)
The fix is based on the same strategy for handling namespace
declarations as used by getAttributeNode. Note that this strategy makes
these methods not return a DOMAttr for xmlns* attributes, but an
instance of the (undocumented) class DOMNameSpaceNode. This is not
really ideal, but at least this fix makes the behavior of
getAttributeNode and getAttributeNodeNS consistent.

A follow-up action would be to investigate whether DOMNameSpaceNode can
be made into a subclass of DOMAttr (which may be hard due to the way
libxml treats namespace declarations) or document this deviating return
value for xmlns* attributes.
2017-01-25 20:59:25 +00:00
Arnout Boks
737ee0661c
Added (failing) testcase for bug #54382 2017-01-25 20:59:23 +00:00
Nikita Popov
9b916b15a5 Merge branch 'PHP-7.1' 2017-01-10 23:29:50 +01:00
Nikita Popov
908ad3cc80 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:29:43 +01:00
Arnout Boks
13edec75a3 Fixed #73907 (nextSibling property not included in var_dump of DOMNode) 2017-01-10 23:29:02 +01:00
Nikita Popov
52a22fa63c Merge branch 'PHP-7.1' 2017-01-10 23:25:23 +01:00
Nikita Popov
79c0cef8ca Merge branch 'PHP-7.0' into PHP-7.1 2017-01-10 23:25:07 +01:00
Arnout Boks
07340553a5 Fixed bug #61858 (DOMAttr debug info generates E_WARNING)
It seems fair to remove this warning, given that:

* it is not documented in the official documentation
* the $specified property, which has a similar 'not implemented' status,
  also does not trigger a warning
* it apparently hinders quite a lot of people during debugging, judging by
  the number of votes on the bug
2017-01-10 23:24:34 +01:00
Joe Watkins
869a2a1c1b
Merge branch 'PHP-7.1'
* PHP-7.1:
  PR #2211 don't supress warnings in tests
2017-01-07 08:08:25 +00:00
Joe Watkins
58273f631b
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  PR #2211 don't supress warnings in tests
2017-01-07 08:08:09 +00:00
Craig Duncan
98c2cd4311
PR #2211 don't supress warnings in tests 2017-01-07 08:06:38 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Joe Watkins
6a1d3c948b
Merge branch 'PHP-7.1'
* PHP-7.1:
  news entry for PR #2267
  Fixed #67474 (getElementsByTagNameNS and default namespace)
  Add (failing) testcase for bug #67474
2017-01-02 11:59:15 +00:00
Joe Watkins
243dff2057
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  news entry for PR #2267
  Fixed #67474 (getElementsByTagNameNS and default namespace)
  Add (failing) testcase for bug #67474
2017-01-02 11:58:14 +00:00
Arnout Boks
a8955926c2
Fixed #67474 (getElementsByTagNameNS and default namespace)
This bug was caused by the fact that dom_get_elements_by_tag_name_ns_raw
uses an empty string to filter on the default namespace (as NULL means
'no filter'), whereas in the node itself the default namespace is
signalled by nodep->ns being null.
2017-01-02 11:56:37 +00:00
Arnout Boks
19c4a2ef19
Add (failing) testcase for bug #67474 2017-01-02 11:56:33 +00:00
Nikita Popov
bf3ce4db94 Merge branch 'PHP-7.1' 2017-01-01 12:20:52 +01:00
Nikita Popov
2a34042323 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 12:20:46 +01:00
dreamszhu
3c977618e1 Fix dom class can't be inherited by the internal class 2017-01-01 12:20:04 +01:00
Joe Watkins
f2eeb47797
Revert "Merge branch 'PHP-7.1'"
This reverts commit 7eac2fdf53, reversing
changes made to 15b80f105c.
2017-01-01 06:53:29 +00:00
Joe Watkins
dbfbe6261d
Revert "Fix dom class can't be inherited by the internal class"
This reverts commit 705f60e481.
2017-01-01 06:52:41 +00:00
Joe Watkins
7eac2fdf53
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix dom class can't be inherited by the internal class
2017-01-01 06:48:24 +00:00
dreamszhu
705f60e481
Fix dom class can't be inherited by the internal class 2017-01-01 06:48:02 +00:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Pedro Magalhães
617dcf1b37 Remove the binary cast from unrelated tests 2016-11-20 21:11:53 +01:00
Pedro Magalhães
9c5af4e4cb Remove the b prefix from literals on unrelated tests 2016-11-20 21:11:53 +01:00
Kalle Sommer Nielsen
c0d4e72a68 Revert "Fix test, this is kinda ugly, but at least for me on Windows there seems to be some messed up line endings"
This reverts commit aeeaedeeb7.

This seems to make Travis unhappy (shocker), so revert for now until we find a better fix
2016-10-20 16:02:37 +02:00
Kalle Sommer Nielsen
9935d7e163 Save a call to strlen(), since we can figure out the length of this constant value with sizeof() at compile time 2016-10-20 14:28:24 +02:00
Kalle Sommer Nielsen
aeeaedeeb7 Fix test, this is kinda ugly, but at least for me on Windows there seems to be some messed up line endings 2016-10-20 14:24:01 +02:00
Stanislav Malyshev
336322ce63 Fix bug #73150: missing NULL check in dom_document_save_html
(cherry picked from commit 1c0e9126fb)
(cherry picked from commit d1e878f272)
2016-10-14 01:40:12 +02:00
Anatol Belski
d103a41679 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  followup with #73276 merge
  fix test
  Fix bug #73276 - crash in openssl_random_pseudo_bytes function
  Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
  Fix for #73240 - Write out of bounds at number_format
  avoid strlen
  Bug #73218: add mitigation for ICU int overflow
  Add more locale length checks, due to ICU bugs.
  Fix bug #73150: missing NULL check in dom_document_save_html
  Clear FG(user_stream_current_filename) when bailing out
  set versions and release date
  sync NEWS
  Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
  Fix for #73240 - Write out of bounds at number_format
  Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
  set versions
  Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation
2016-10-12 16:06:11 +02:00
Stanislav Malyshev
d1e878f272 Fix bug #73150: missing NULL check in dom_document_save_html
(cherry picked from commit 1c0e9126fb)
2016-10-12 12:19:41 +02:00
Christoph M. Becker
ef0279b640 Merge branch 'PHP-7.0' 2016-07-15 01:22:26 +02:00
Christoph M. Becker
b01b093ca9 Merge branch 'PHP-5.6' into PHP-7.0 2016-07-15 01:14:41 +02:00
Christoph M. Becker
a4aa4f9772 Fix bug #66502: DOM document dangling reference
When we decrement the refcount of a node's document, we state that we
won't need it anymore. Therefore we can *always* set the pointer to the
document to NULL, what avoids invalid memory accesses for some edge cases
as demonstrated with the PHPT.

Original patch provided by Sean Heelan.
2016-07-15 01:08:08 +02:00
Aaron Piotrowski
24237027bc Merge branch 'throw-error-in-extensions' 2016-07-05 02:08:39 -05:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Aaron Piotrowski
771e5cc247 Replace zend_ce_error with NULL and replace more E_ERROR with thrown Error 2016-06-13 09:02:17 -05:00
Aaron Piotrowski
e3c681aa5c Merge branch 'master' into throw-error-in-extensions 2016-06-10 22:02:23 -05:00
Dmitry Stogov
f0a2e8eb13 Removed "zend_fcall_info.function_table". It was assigned in many places, but is never used. 2016-04-27 13:46:38 +03:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Xinchen Hui
2068bb1a11 Missed semicolon 2016-02-18 12:04:27 +08:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Tom Van Looy
aadb3dd503 These function docs are referencing zend_object_value but this should be zend_object 2015-12-24 10:24:53 +01:00
Xinchen Hui
4171a8f6c6 Internal function argumensts cleanup (strict_types) 2015-12-12 22:52:37 -08:00
Anatol Belski
a7552ca310 add ovfl check, fix warnings 2015-09-24 16:33:56 +02:00
Dmitry Stogov
51cd49b2cf Cleanup: replace removed condition with ZEND_ASSERT() 2015-09-24 00:25:51 +03:00
Xinchen Hui
c87ef023aa Fixed Bug #70558 ("Couldn't fetch" error in DOMDocument::registerNodeClass()) 2015-09-23 07:01:50 -07:00
Anatol Belski
0c7872f88a add range check 2015-09-16 15:39:21 +02:00
Anatol Belski
969dcf7b61 add overflow check 2015-09-12 18:57:23 +02:00
Anatol Belski
5d035b57ee fix data types 2015-09-12 18:53:30 +02:00
Anatol Belski
c6ff5be09d add range checks 2015-09-12 10:29:00 +02:00
Christoph M. Becker
1b344f55f4 Revert "Fix #70029: nodeValue of DOMElement list content of children nodes"
This reverts commit 25a52d98d7.
2015-09-06 15:36:43 +02:00
Christoph M. Becker
25a52d98d7 Fix #70029: nodeValue of DOMElement list content of children nodes
According to the W3C DOM Core Level 3 specification DOMElement::nodeValue is
supposed to yield null, but currently the DOM extension yield the result of
calling xmlNodeGetContent(), what is the concatenation of the values of the
children of the element. This patch fixes the non standard behavior.
2015-09-05 01:52:41 +02:00
Christoph M. Becker
c9a8733ce2 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70001: Assigning to DOMNode::textContent does additional entity encoding

Resolved conflicts:
	ext/dom/node.c
2015-09-05 01:32:08 +02:00
Christoph M. Becker
b2954c64ab Fix #70001: Assigning to DOMNode::textContent does additional entity encoding
Assigning to DOMNode::textContent encodes entities, what does not match the
behavior of DOMText::__construct() and DOMDocument::createTextNode. This patch
changes the behavior of DOMNode::textContent in this regard.
2015-09-05 01:17:50 +02:00
Anatol Belski
201afce875 add some range checks to ext/dom 2015-08-26 16:39:50 +02:00
Dmitry Stogov
715d5d2855 Get rid of implicit type casting in GC_*() macros in Zend/zend_types.h.
This prevented compilation warnings and disclosed few incorrect usages in Zend/zend_vm_def.h and ext/dom/xpath.c.
Now explicit type casting may be required on call site.
This may break some C extension code, but it shoulfn't be a problem to add explicit casting.
2015-08-13 13:56:29 +03:00
Christoph M. Becker
6576d809a5 test fails with old libxml2; skip in this case 2015-07-31 19:52:42 +02:00
Dmitry Patsura
ed3c7adc5f Remove unneded space(s) 2015-08-03 18:38:41 +08:00
Anatol Belski
545b364d56 remove TSRMLS_*
either remains or merged in from PHP5
2015-08-02 13:42:01 +02:00
Christoph M. Becker
78eab007a9 Merge branch 'PHP-5.6'
* PHP-5.6:
  test fails with old libxml2; skip in this case
2015-07-31 19:55:07 +02:00
Nikita Popov
5c95226d50 Various warning fixes 2015-07-17 20:18:25 +02:00
Rasmus Lerdorf
1af1afdfdc DOMDocument::saveXML has a 2nd optional arg 2015-07-10 15:17:06 -07:00
Aaron Piotrowski
7ec1e17464 Update memory freeing and other issues, revert some changes 2015-07-05 23:25:53 -05:00
Aaron Piotrowski
907476f34c Convert E_ERROR to thrown Error in extensions 2015-07-05 12:16:57 -05:00
Aaron Piotrowski
ed1b64877d Switch position of ce in exception ce variable names 2015-07-03 09:45:03 -05:00
Aaron Piotrowski
a812a74c2e Change zend_exception_get_default() to zend_exception_ce 2015-07-03 09:44:48 -05:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Christoph M. Becker
86df85f43a Merge branch 'PHP-5.6'
* PHP-5.6:
  added regression test for bug #69679
2015-06-27 01:10:41 +02:00
Christoph M. Becker
6400ef192c added regression test for bug #69679
DOMDocument::loadHTML refuses to accept NULL bytes.
2015-06-27 01:08:56 +02:00
Rasmus Lerdorf
41774bceff Fix more minor mistakes in the proto comments 2015-06-23 15:47:33 -04:00
Anatol Belski
1e65b65dd6 more precise way to destroy iterator object
which also fixes the iterator_to_array test
2015-06-19 14:23:32 +02:00