Commit Graph

707 Commits

Author SHA1 Message Date
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
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
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +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
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +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
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
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
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08: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