Michael Orlitzky [Fri, 10 Jun 2016 03:12:17 +0000 (23:12 -0400)]
ext/tidy: fix non-deterministic expected output in two tests.
Some of the tidy tests expect output that can change. The motivating
example is an object "id" that is some integer, but no integer in
particular. Those hard-coded values have been changed to accept any
integer so that the test suite passes when tidy-html5 is used.
Michael Orlitzky [Fri, 10 Jun 2016 03:09:33 +0000 (23:09 -0400)]
ext/tidy: fix DOCTYPE definitions in expected test output.
The test suite for the tidy extension was written before HTML5 was
"standardized". The new tidy-html5 library will output an HTML5
DOCTYPE in the absence of any other information, so the expected test
outputs have been updated to accomodate the absense of an HTML version
(which is how you declare "HTML5").
Michael Orlitzky [Fri, 10 Jun 2016 03:00:02 +0000 (23:00 -0400)]
ext/tidy: add support for the new tidy-html5 library.
Our existing libtidy support is based on the legacy "HTML tidy"
project. That project now has a successor called tidy-html5, where all
new features and bugfixes happen. Of particular note are the fixes for
two security vulnerabilities, CVE-2015-5522 and CVE-2015-5523.
The API is largely unchanged in the new project (which is truly the
successor of the original -- not a fork), and so it is almost a
drop-in replacement as far as PHP is concerned. However, one file has
changed in the new project: "buffio.h" has been moved to
"tidybuffio.h".
This commit detects the presence of tidybuffio.h at build time, and
then adjusts the import statement in tidy.c accordingly. The result is
a build that works against either the legacy project or the new
tidy-html5 project, although the test suite for the tidy extension now
fails. Those failures are not critical and will be fixed.
* PHP-7.0:
Fixed bug #72570 Segmentation fault when binding parameters on a query without placeholders
Fixed bug #70313 PDO statement fails to throw exception
To give userland developers who work with large numbers of file descriptors
the opportunity to avoid problems on systems which may not support that
many descriptors (e.g. when calling socket_select()), we make FD_SETSIZE
available in PHP as PHP_FD_SETSIZE.
* pull-request/1955:
Add parenthesis to if statements
Correctly add to the length of the final string
Correctly add to the length of the final string
Fix minor spacing issue
Make LDAP_ESCAPE_DN compliant with RFC 4514
Lauri Kenttä [Wed, 25 May 2016 16:52:11 +0000 (19:52 +0300)]
base64_decode: remove redundant code
case 1 is already handled in the first lines of the for loop;
it would only be entered in the invalid case where the string
continues past the defined length (ch != 0 but length-- == 0).
case 2 and case 3 are redundant, since k >= j and later the
string is truncated to j characters anyway.
Lauri Kenttä [Wed, 25 May 2016 18:15:52 +0000 (21:15 +0300)]
base64_decode: remove redundant check
If length == 0 || *current != '=' is false, the for loop will always
end up in this same point, until the if statement becomes true.
Thus, the if statement is not needed.
David Walker [Sat, 2 Jul 2016 16:44:17 +0000 (10:44 -0600)]
Fix #72409 - return previous handler
This patch addresses https://bugs.php.net/bug.php?id=72409
This patch is applied to master compared to PR#1952 which was
patching 5.6.x branch of PHP
This patch takes into account discussions on PR #1978
Addressing that rather than have pcntl_signal() return a value
to create a new function that can be used to get the current
value of the signal handler.
Lauri Kenttä [Wed, 25 May 2016 16:52:11 +0000 (19:52 +0300)]
base64_decode: remove redundant code
case 1 is already handled in the first lines of the for loop;
it would only be entered in the invalid case where the string
continues past the defined length (ch != 0 but length-- == 0).
case 2 and case 3 are redundant, since k >= j and later the
string is truncated to j characters anyway.