Dmitry Stogov [Mon, 11 Mar 2019 12:39:34 +0000 (15:39 +0300)]
Closure::fromCallable() supports only regular methods and magic method invoked through __call()/__callStatic().
It doesn't support method of internal classes invoked through C object or class handlers.
This commit prevents crash described at bug #77708, but doesn't implement the desired behavior.
Andrew Brampton [Mon, 4 Mar 2019 03:57:40 +0000 (19:57 -0800)]
Fix #71890: Add support for crc32c Castagnoli's polynomial.
This variant of crc32 is heavily used by storage systems, such as iSCSI, SCTP,
Btrfs, ext4, and is increasingly being used in API (such as Google Cloud
Storage, and Apache Kafka).
Daniel Stenberg [Wed, 6 Mar 2019 23:06:00 +0000 (00:06 +0100)]
curl_exec: remove bad check for CURLE_PARTIAL_FILE
This check introduced in 2004 is wrong and removed. A HEAD request with
curl does *not* cause this error code - only if you make a regular GET
request but tell curl to send a HEAD using CURLOPT_CUSTOMREQUEST and
then you've asked for it.
You do a proper HEAD request with curl by setting the CURLOPT_NOBODY
option to 1L.
This was the case in 2004. This is still the case in 2019. This is also
documented in libcurl documentation.
This check hides the possibly serious error when this error code is
genuinely and correctly returned by curl because the transfer was
truncated and ended up partial.
As can be seen, I objected to this change already in the original bug:
https://bugs.php.net/bug.php?id=27341
Anatol Belski [Thu, 28 Feb 2019 11:48:47 +0000 (12:48 +0100)]
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test,
where an encrypt API is used with a decrypt context. The EVP_Cipher*
functions will automatically choose the right operation depending on the
context passed.
Peter Kokot [Thu, 7 Mar 2019 19:58:14 +0000 (20:58 +0100)]
Clean *nix build system
- remove some outdated and not used macro calls
- remove some unused variables
- Remove not needed comment from tokenizer config.m4
- Remove not needed comment
- remove not needed local variables for editors and syntax highlighting
Peter Kokot [Thu, 7 Mar 2019 00:57:53 +0000 (01:57 +0100)]
Refactor README.md file
- Initial refactorings of the README.md file with some more user
oriented information about the php-src repository and PHP in general.
- SVG logo added
- README.WIN32-BUILD-SYSTEM file contents moved to README.md
- INSTALL file contents moved to README.md
- Windows releases now instead of install.txt file ship with the
README.md.
- A brief installation section added with help options mentioned for the
configure and make.
- Also mentioned the `-j` option for build and tests
Co-authored-by: Javier Eguiluz <javier.eguiluz@gmail.com> Co-authored-by: Gabriel Caruso <carusogabriel34@gmail.com> Co-authored-by: Matthias Kaschubowski <nihylum@gmail.com>
Peter Kokot [Sun, 17 Feb 2019 13:21:58 +0000 (14:21 +0100)]
Update editorconfig
Changes:
- New property max_line_length
- COMMIT_EDITMSG file added when writing commit messages
- Markdown files can have trimmed trailing whitespace also to simplify
settings.
- https link used to EditorConfig page.
- Added also *.y, *.cpp, and *.inc files
- The tab_width moved to a new all files section
Peter Kokot [Sat, 2 Mar 2019 13:42:21 +0000 (14:42 +0100)]
Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.
This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.
The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.
The usage of HAVE_ULONG removed since it is not used in current code
base.
Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
not defined with current build system.
- flags are unsigned int
- max_allowed_packet changed to unsigned int
Signed shift of 31 for int and 63 for long is flagged as undefined
behavior by UBSan (-fsanitize=undefined) and seems to be indeed so
according to the standard.
Fix #77700: Writing truecolor images as GIF ignores interlace flag
We revert the interlace flag related part of commit ff2822a[1], since
contrary to the transparent color, the interlace flag is not retained
by `gdImageCreatePaletteFromTrueColor()`. This also matches upstream
libgd.
In order to rename safer, we do the following:
- set umask to 077 (unfortunately, not TS, so excluding ZTS)
- chown() first, to set proper group before allowing group access
- chmod() after, even if chown() fails