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`
Several tests use `/tmp` in the `--INI--` section, but this is not
portable. We therefore introduce the `{TMP}` placeholder which
evaluates to the system's temporary directory using
`sys_get_temp_dir()`.
We also remove the doubtful `strpos()` optimization.
Nikita Popov [Wed, 8 May 2019 09:24:08 +0000 (11:24 +0200)]
Deduplicate inheritance type check implementation
Make the check covariant (insofar as it is allowed now, i.e.
nullability and iterable) and call it with appropriate argument
order for both parameter and return types.
This makes it simpler to extend to full variance support.
`CURLPIPE_HTTP1` is deprecated and has no effect as of cURL 7.62.0[1].
We therefore deprecate the PHP constant as well, and trigger a warning
that it is no longer supported, if used against cURL 7.62.0 and up.
Sebastian Pop [Wed, 17 Apr 2019 15:03:37 +0000 (15:03 +0000)]
[AArch64] Use NEON to initialize zend_hash
On A72, google-benchmark measure before and after the patch:
--------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------
BM_hash_init_before 43.6 ns 43.6 ns 16052937
BM_hash_init_after 27.0 ns 27.0 ns 25877296
Patch written by Ali Saidi <alisaidi@amazon.com>
and Sebastian Pop <spop@amazon.com>
To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`
Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).
Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.
Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`
Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).
Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.
Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
Peter Kokot [Mon, 6 May 2019 23:09:25 +0000 (01:09 +0200)]
[ci skip] Rename libbcmath license file to LICENSE
- More common filename accross the PHP repository
- Additionally, this patch replaces some legacy form feed (FF or ^L)
characters (for printers) to LF (\n) newline character.
Peter Kokot [Sat, 4 May 2019 15:57:54 +0000 (17:57 +0200)]
Remove phpextdist
This script hasn't been used since using PEAR as a package manager for
PHP extensions since it is using Makefile.in as an indicator if the
current directory is extension. Instead of this script extensions can
be packaged differently and more properly with either current PEAR
or with some other manual method.
These have been inadvertently dropped when changing the test suite to
not require ext/interbase anymore, so we add them back.
We also change the required environment variable names to match the
usual PDO names. Particularly, we replace `PDO_FIREBIRD_TEST_HOSTNAME`
and `_DATABASE` with the more flexible `PDO_FIREBIRD_TEST_DSN`.
0x2d == 45, not 46. However, `CURLMOPT_PUSHFUNCTION` is actually
available as of cURL 7.44.0[1], while we make the respective PHP
constants available only as of cURL 7.46.0[2].
- This renames the environment variables to: PDO_FIREBIRD_TEST_XXX to be in line with other PDO test suites
- Adds an skipif.inc file that skips the tests if no database is set
- The test suite can now be run without PDO_FIREBIRD_TEST_HOSTNAME
$ set PDO_FIREBIRD_TEST_HOSTNAME=localhost
$ set PDO_FIREBIRD_TEST_DATABASE=C:\dev\php.fdb
$ nmake test TESTS=ext/pdo_firebird/tests
The only way I could get this to work on my local machine was with a DSN like:
- firebird:dbname=localhost:C:\php.fdb
Hence why the 'hostname' can be specified.
There is also a bit mess in regards to cleanup of this extension tests, but I really do not want to dwell down there, if someone dares to do so, then please be my guest.
Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
I do not completely understand what is going on there, but I am pretty
sure dir_entry <= offset_base if not a normal situation, so we better not
to rely on such dir_entry.
Fix #77821: Potential heap corruption in TSendMail()
`zend_string_tolower()` returns a copy (not a duplicate) of the given
string, if it is already in lower case. In this case we must not not
`zend_string_free()` both strings. The cleanest solution is to call
` zend_string_release()` on both strings, which properly handles the
refcount.
Peter Kokot [Mon, 29 Apr 2019 20:34:43 +0000 (22:34 +0200)]
Remove TSRM configuration header
TSRM configuration header file was once created by separate autoconf
build system for TSRM and is with the current code not directly needed
like this anymore.
Fix #77943: imageantialias($image, false); does not work
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.
We also make sure that we don't attempt to enable anti-aliasing for
palette images.
Fix #77943: imageantialias($image, false); does not work
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.
We also make sure that we don't attempt to enable anti-aliasing for
palette images.