Peter Kokot [Tue, 14 May 2019 19:50:29 +0000 (21:50 +0200)]
Enhance the tokenizer data generator script
Changes:
- executable from any location (for example, project root)
- some minor common shell scripts CS fixes
- error reporting done based on the presence of the parser file
Fix #78003: strip_tags output change since PHP 7.3
A refactoring of the strip tags state machine[1] missed the special
treatment of `depth > 0` when a `>` is encountered in state 2 or 3. We
re-add it for BC reasons.
Theodore Brown [Thu, 9 May 2019 19:19:52 +0000 (14:19 -0500)]
Fix #77993: Wrong parse error for invalid hex literal on Windows
If a PHP file contains an invalid hex literal such as `0x_10`, the expected error
is `Parse error: syntax error, unexpected 'x_10' (T_STRING) in %s on line %d`.
This already worked correctly on Linux, but on Windows prior to this patch a different
error was produced: `Parse error: Invalid numeric literal in %s on line %d`.
Deprecate and ignore $version parameter of curl_version()
`curl_version()`[1] (of ext/curl) makes `curl_version_info()`[2] (of
libcurl) available to PHP userland. The latter requires to pass an
`age` argument which usually is `CURLVERSION_NOW`, so that the
information returned by the runtime matches the declarations used
during compile time. For C programs it is simply necessary to pass
this information, and in rare occasions it might make sense to pass
something else than `CURLVERSION_NOW`. curl.h notes:
| The 'CURLVERSION_NOW' is the symbolic name meant to be used by
| basically all programs ever that want to get version information.
For the PHP binding, using a newer `age` than available at compile time
will neither provide the PHP program more information, nor would using
an older `age` have tangible benefits.
We therefore deprecate the useless `$version` parameter, and if it is
passed nonetheless, we use `CURLVERSION_NOW` instead of the supplied
value, and raise a warning.
Peter Kokot [Sun, 12 May 2019 21:51:39 +0000 (23:51 +0200)]
[ci skip] Refactor libgd docs
Changes to simplify managing libgd docs a bit:
- Move copyright statement and licensing info to common redistributable
bins file. All previous notices left intact and updated with the
upstream info.
- Remove unsynced and difficult to track README file compared to
upstream README.md file available at https://github.com/libgd/libgd
Peter Kokot [Sun, 12 May 2019 16:43:03 +0000 (18:43 +0200)]
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
Since all current ODBC test cases use the same DSN, there may be
conflicts when running tests in parallel. We prevent this by adding a
CONFLICTS marker which might be unnecessarily general, but get's the
job done, and still can be refined later.
Peter Kokot [Sat, 11 May 2019 16:29:30 +0000 (18:29 +0200)]
Integrate libmbfl docs to README.md and LICENSE
- All credits, license info preserved, only merged together to not have
to many places to edit.
- Changelogs integrated in the readme since they are not used anymore.
Additionally the scatter filter also supports by only shifting pixels where
the current pixel being iterated is one or more colors, allowing the scatter
filter to only effect solid colors in part of an image.
Note, due to the nature of randomness and implementation, pixels who were
shifted ahead of iteration will be shifted once more and therefore the
bottom right of an image may contain a slight scatter effect due to this.
Since PHP strings are binary safe (i.e. they may contain NUL bytes), we
must not assume that strlen()/wcslen() actually return the length of
the string. Only if the given in_len is zero, it is safe to assert
this.
Nikita Popov [Thu, 9 May 2019 12:19:53 +0000 (14:19 +0200)]
Fixed bug #71030
Make sure to always fetch the RHS of a list assignment first, instead
of special casing known self-assignments, which will not detect cases
using references correctly.
As a side-effect, it is no longer possible to do something like
byRef(list($x) = $y). This worked by accident previously, but only
if $y was a CV and the self-assignment case did not trigger.
However it shouldn't work for the same reason that byRef($x = $y)
doesn't. Conversely byRef(list(&$x) = $y) and byRef($x =& $y)
continue to be legal.
Peter Kokot [Sat, 4 May 2019 15:28:24 +0000 (17:28 +0200)]
Remove vcsclean script
The vcsclean script is really only a wrapper for a git clean command.
Developers should use the more proper and clear native Git command
directly instead:
`git clean -Xfd`