Peter Kokot [Sat, 1 Dec 2018 20:10:03 +0000 (21:10 +0100)]
Remove support for Rhapsody code name
The Rhapsody code name was once used for computers with operating system
by Apple and was mostly replaced with a newer code name Darwin:
- https://en.wikipedia.org/wiki/Rhapsody_(operating_system)
- https://en.wikipedia.org/wiki/Darwin_(operating_system)
This patch removes obsolete checks from the *nix build script files.
`GD_CROP_DEFAULT` and `GD_CROP_SIDES` are names of libgd constants, and
as such they are not relevant for userland developers. Therefore, we
replace them by the constant names of our wrapper, i.e.
`IMG_CROP_DEFAULT` and `IMG_CROP_SIDES`, respectively.
Peter Kokot [Sat, 1 Dec 2018 20:36:40 +0000 (21:36 +0100)]
Replace AC_CHECK_FILE with test -f
The AC_CHECK_FILE macro is designed to emit a warning about possible
cross compiling issues if file is not present on the target system.
Since the generated PHP lexer file is part of the build files and not
target system this can be simplified by a usual shell check with
`test -f` instead as in other usages.
Fix #73291: imagecropauto() $threshold differs from external libgd
Since upstream does not appear to move in any way[1], we sync our
behavior. Even though the BC break is ugly (which is the reason we
target master only), having to deal with different algorithms is even
worse for portable userland code.
Since cropping support has been added to our bundled libgd,
`gdImageAutoCrop` differs from upstream in that `GD_CROP_DEFAULT` falls
back on `GD_CROP_SIDES` if there is no transparent color in the image.
While this difference seem to be a useful improvement in our bundled
libgd, upstream has not yet signaled that there willing to back-port
it[1], so we revert it to stay in sync with upstream.
We also remove the additional NULL bailout at the end of the function,
which doesn't appear to be relevant any longer since bug 77198 has been
fixed.
While both source and destination buffers have the same size (6 bytes),
and this is unlikely to change in the future, we nonetheless fix the
illogical `strncpy` size.
Based on a pull request provided by Cristian Rodríguez.
`SQLite3::readOnly()` uses `sqlite3_stmt_readonly()` which is only
available as of libsqlite 3.7.4. For older SQLite3 versions we return
always `false`, which can be confusing. Instead of sticking with this
behavior, or even undefining the method for old SQLite3 versions, we
lift the requirements to SQLite 3.7.4 (released on 2010-12-08),
according to a respective discussion[1].
Since pdo_sqlite doesn't use `sqlite3_stmt_readonly()`, we stick with
the minimum requirement of SQLite 3.5.0.
Since bug 77051 has been fixed, it is unlikely that any of the
`sqlite3_bind_*` calls will ever fail, but we add respective checks
nonetheless, and call `php_sqlite3_error()` in case of bind failures.
Deny (un)serialization of SQLite3, SQLite3Stmt and SQLite3Result
Serializing `SQLite3`, `SQLite3Stmt` and `SQLite3Result` instances is
possible but pointless, since unserializing results in uninitialized
instances, which will bail out of any method call. Therefore, we deny
serialization and unserialization in the first place.
* PHP-7.3:
Add DISPLAY_INI_ENTRIES for imap
Disable rsh/ssh functionality in imap by default (bug #77153)
Disable rsh/ssh functionality in imap by default (bug #77153)
* PHP-7.2:
Add DISPLAY_INI_ENTRIES for imap
Disable rsh/ssh functionality in imap by default (bug #77153)
Disable rsh/ssh functionality in imap by default (bug #77153)
* PHP-7.1:
Add DISPLAY_INI_ENTRIES for imap
Disable rsh/ssh functionality in imap by default (bug #77153)
Disable rsh/ssh functionality in imap by default (bug #77153)
* PHP-7.0:
Add DISPLAY_INI_ENTRIES for imap
Disable rsh/ssh functionality in imap by default (bug #77153)
Disable rsh/ssh functionality in imap by default (bug #77153)
Nikita Popov [Wed, 28 Nov 2018 19:08:39 +0000 (20:08 +0100)]
Fixed bug #77215
Remove invalid assertion: A block can have multiple switch frees,
so if we don't do live range block splitting, it is not necessarily
true that the free is located at the start of a block.
Nikita Popov [Mon, 26 Nov 2018 13:00:42 +0000 (14:00 +0100)]
Remove redundant __clone() methods from Reflection
Reflection classes already use NULLed clone_obj to signal that they
cannot be cloned, so it's not necessary to additionally declare a
throwing __clone() method.
Nikita Popov [Mon, 26 Nov 2018 12:53:48 +0000 (13:53 +0100)]
Remove redundant Exception::__clone() method
Exceptions already prohibit cloning by setting clone_obj to NULL
(which is integrated with reflection). No need to additionally
define a dummy __clone() method.
Peter Kokot [Thu, 22 Nov 2018 23:40:34 +0000 (00:40 +0100)]
Add re2c checking with error exit code
To make installation experience better instead of only outputting
warning when re2c is not present this patch also exits if the PHP lexer
file(s) were not generated yet and re2c is not present on the system.
Fix #77198: auto cropping has insufficient precision
We apply the upstream patch[1], and also fix the erroneous bailout at
the end of `gdImageAutoCrop()`, since `crop.x` and `crop.y` may very
well be zero.
Fix #77195: Incorrect error handling of imagecreatefromjpeg()
The broken JPEG image triggers a notice, two warnings and outputs a
message to stderr directly. The additional notice is pretty useless,
and the direct output to stderr is bad. Therefore, we port the
relevant differences from upstream to our bundled libgd. This leaves
us with two warnings; the first one is triggered by libjpeg and shows
the actual problem, the second one is triggered by our libgd wrapper
whenever an image can't be read, what may not have necessarily
triggered a warning before.