]> granicus.if.org Git - php/log
php
4 years agoFix ?-> in encaps vars without braces
Ilija Tovilo [Sun, 9 Aug 2020 17:24:44 +0000 (19:24 +0200)]
Fix ?-> in encaps vars without braces

Closes GH-5966.

4 years agoDrop php_pdo_get_exception_base() function
Nikita Popov [Tue, 11 Aug 2020 15:24:03 +0000 (17:24 +0200)]
Drop php_pdo_get_exception_base() function

This API is more confusing than helpful.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 11 Aug 2020 15:13:32 +0000 (17:13 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 15:13:00 +0000 (17:13 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

4 years agoFix #64705 errorInfo property of PDOException is null when PDO::__construct() fails
Ahmed Abdou [Sun, 17 Feb 2019 21:59:00 +0000 (22:59 +0100)]
Fix #64705 errorInfo property of PDOException is null when PDO::__construct() fails

PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 11 Aug 2020 14:29:01 +0000 (16:29 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #75785 by attempt switching endianness on Maker's Note

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 14:26:55 +0000 (16:26 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #75785 by attempt switching endianness on Maker's Note

4 years agoFix bug #75785 by attempt switching endianness on Maker's Note
Nawarian [Sun, 12 Jul 2020 19:53:52 +0000 (21:53 +0200)]
Fix bug #75785 by attempt switching endianness on Maker's Note

Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big refactor and a gigantic lookup
table, this commit simply attempts to switch the
endianness and proceed when values are acceptable.

Closes GH-5849.

4 years agoFixed bug #79927
Nikita Popov [Tue, 11 Aug 2020 13:48:40 +0000 (15:48 +0200)]
Fixed bug #79927

We need to unset the AT_FIRST_YIELD flag when yielding from an
array as well.

In the interest of being conservative, I'm applying this only to
PHP 8.

4 years agoFix nullsafe operator on $this
Nikita Popov [Tue, 11 Aug 2020 13:22:14 +0000 (15:22 +0200)]
Fix nullsafe operator on $this

4 years agoSAVE_OPLINE in NULL_HANDLER
Nikita Popov [Tue, 11 Aug 2020 13:14:50 +0000 (15:14 +0200)]
SAVE_OPLINE in NULL_HANDLER

Let's avoid crashing before the nice error message gets printed...

4 years agoFix nullsafe operator on reference
Nikita Popov [Tue, 11 Aug 2020 13:11:36 +0000 (15:11 +0200)]
Fix nullsafe operator on reference

Dereference the value before checking the type. As the happy path
necessarily has to check for references, I'm not bothering to
delay the comparison.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 11 Aug 2020 12:59:04 +0000 (14:59 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79917

4 years agoFixed bug #79917
Nikita Popov [Tue, 11 Aug 2020 12:42:13 +0000 (14:42 +0200)]
Fixed bug #79917

op_arrays can be shared on two levels: Either the op_array is
completely shared, or it is distinct but shares all members
(apart from static_variables).

The the op_array is distinct, we need to make sure to properly
initialize the MAP_PTR structures.

4 years agoAutogenerate function entries for COMPersistHelper
Christoph M. Becker [Tue, 11 Aug 2020 08:17:43 +0000 (10:17 +0200)]
Autogenerate function entries for COMPersistHelper

Co-authored-by: Nikita Popov <nikita.ppv@googlemail.com>
4 years agoRemove practically unused parameter
Christoph M. Becker [Tue, 11 Aug 2020 09:37:52 +0000 (11:37 +0200)]
Remove practically unused parameter

The `cached` out parameter of `php_com_load_typelib_via_cache()` was
meant to signal whether a particular typelib actually has been cached.
This is not really relevant, though, for the imagined purposes, and
since the parameter is no longer really used, we removed it altohether.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 11 Aug 2020 09:28:41 +0000 (11:28 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #48585: com_load_typelib holds reference, fails on second call

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 11 Aug 2020 09:27:50 +0000 (11:27 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #48585: com_load_typelib holds reference, fails on second call

4 years agoFix #48585: com_load_typelib holds reference, fails on second call
Christoph M. Becker [Tue, 4 Aug 2020 16:25:50 +0000 (18:25 +0200)]
Fix #48585: com_load_typelib holds reference, fails on second call

Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request.  And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Tue, 11 Aug 2020 08:35:59 +0000 (10:35 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79951

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 11 Aug 2020 08:35:17 +0000 (10:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79951

4 years agoFixed bug #79951
Nikita Popov [Tue, 11 Aug 2020 08:33:59 +0000 (10:33 +0200)]
Fixed bug #79951

One branch did not release tmp_replace_entry_str.

Also reduce the scope of some variables.

4 years agoRemove unnecessary function entry array
Máté Kocsis [Tue, 11 Aug 2020 07:40:14 +0000 (09:40 +0200)]
Remove unnecessary function entry array

4 years agoMerge branch 'PHP-7.4'
George Wang [Mon, 10 Aug 2020 23:11:48 +0000 (19:11 -0400)]
Merge branch 'PHP-7.4'

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
George Wang [Mon, 10 Aug 2020 23:11:26 +0000 (19:11 -0400)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoMake sure string is NUL byte terminated.
George Wang [Mon, 10 Aug 2020 23:11:03 +0000 (19:11 -0400)]
Make sure string is NUL byte terminated.

4 years agoFix signature of callback function
Christoph M. Becker [Mon, 10 Aug 2020 17:42:05 +0000 (19:42 +0200)]
Fix signature of callback function

Cf. <https://docs.microsoft.com/en-us/windows/win32/api/imagehlp/nc-imagehlp-pimagehlp_status_routine>.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 10 Aug 2020 19:53:26 +0000 (21:53 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check the correct list

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 10 Aug 2020 19:53:20 +0000 (21:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Check the correct list

4 years agoCheck the correct list
Nikita Popov [Mon, 10 Aug 2020 19:52:36 +0000 (21:52 +0200)]
Check the correct list

This was supposed to check mx_list, not weight_list... oops.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 10 Aug 2020 18:43:24 +0000 (20:43 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #79944

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Mon, 10 Aug 2020 18:43:04 +0000 (20:43 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #79944

4 years agoFix bug #79944
Nikita Popov [Mon, 10 Aug 2020 14:53:31 +0000 (16:53 +0200)]
Fix bug #79944

Only return true from dns_get_mx if we actually found any MX record.

4 years agoSkip bug70417.phpt if lsof output looks wrong
Nikita Popov [Mon, 10 Aug 2020 12:36:06 +0000 (14:36 +0200)]
Skip bug70417.phpt if lsof output looks wrong

On alpine lsof accepts -p but it doesn't actually do anything.
Add a crude check for whether lsof looks like Linux lsof.

4 years agoCheck permissions in pcntl_unshare_03.phpt
Nikita Popov [Mon, 10 Aug 2020 12:20:37 +0000 (14:20 +0200)]
Check permissions in pcntl_unshare_03.phpt

4 years agoDon't check specific message in socket_shutdown.phpt
Nikita Popov [Mon, 10 Aug 2020 12:19:04 +0000 (14:19 +0200)]
Don't check specific message in socket_shutdown.phpt

4 years agoOnly test one error in socket_strerror() test
Nikita Popov [Wed, 5 Aug 2020 09:31:31 +0000 (11:31 +0200)]
Only test one error in socket_strerror() test

The messages differ by used libc and version, so let's not try to
do exhaustive testing here.

4 years agoFixed bug #62294
Nikita Popov [Mon, 10 Aug 2020 10:54:02 +0000 (12:54 +0200)]
Fixed bug #62294

The primary issue was already resolved in 7c3e487289ec41e560cf7a77e36eb43da2234f33,
but the particular example used in this bug report ran into an
additional issue on PHP 8, because I forgot to drop a number of
zend_bailout calls when switch require failure to throw.

4 years agoFixed bug #65275
Nikita Popov [Mon, 10 Aug 2020 10:39:19 +0000 (12:39 +0200)]
Fixed bug #65275

Make EG(exit_status) the single source of truth for the exit status,
instead of having two variables that we cannot really keep
synchronized.

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Mon, 10 Aug 2020 10:27:33 +0000 (12:27 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix #79922: Crash after multiple calls to xml_parser_free()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 10 Aug 2020 10:25:08 +0000 (12:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79922: Crash after multiple calls to xml_parser_free()

4 years agoFix #79922: Crash after multiple calls to xml_parser_free()
Christoph M. Becker [Mon, 10 Aug 2020 08:40:31 +0000 (10:40 +0200)]
Fix #79922: Crash after multiple calls to xml_parser_free()

We must not call `zend_list_delete()` in resource closer functions
exposed to userland, because decreasing the refcount there leads to
use-after-free scenarios.  In this case, commit 4a42fbb worked for
typical use-cases where `xml_parser_free()` has been called exactly
once for the resource, because there is an internal zval (`->index`)
referencing the same resource which already increased the refcount by
one.  However, when `xml_parser_free()` is called multiple times on the
same XML parser resource, the resource would be freed prematurely.

Instead we forcefully close the resource in `xml_parser_free()`.  We
also could decrease the refcount of the resource there, but that would
require to call `xml_parser_free()` which is somewhat uncommon, and
would be particularly bad wrt. PHP 8 where that function is a NOP, and
as such doesn't have to be called.  So we do no longer increase the
refcount of the resource when copying it to the internal zval, and let
the usualy refcounting semantics take care of the resource destruction.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=4a42fbbbc73aad7427aef5c89974d1833636e082>

4 years agoRemove some unnnecessary null checks in openssl
Nikita Popov [Mon, 10 Aug 2020 10:09:38 +0000 (12:09 +0200)]
Remove some unnnecessary null checks in openssl

Remove null checks before EVP_PKEY_free and BIO_free. NULL is a
no-op for both of these. Probably applies to most other freeing
function as well...

4 years agoImprove X509_PKEY management in OpenSSL
Nikita Popov [Thu, 6 Aug 2020 11:18:29 +0000 (13:18 +0200)]
Improve X509_PKEY management in OpenSSL

Remove the free_pkey argument from php_openssl_pkey_from_zval,
instead return an EVP_PKEY that always needs to be freed
(by incrementing refcount if necessary).

This makes the code simpler and fixes a number of bugs in the
existing handling.

Closes GH-5946.

4 years agoExpand upgrading note for namespaced name change
Nikita Popov [Mon, 10 Aug 2020 09:19:35 +0000 (11:19 +0200)]
Expand upgrading note for namespaced name change

Mention the case from bug #79942.

[ci skip]

4 years agoFixed bug #79948
Nikita Popov [Mon, 10 Aug 2020 08:28:13 +0000 (10:28 +0200)]
Fixed bug #79948

Make sure we don't execute further scripts if one of them encountered
an exit exception.

Also make sure that we free file handles that end up unused due to
an early abort in php_execute_scripts(), which turned up as an
issue in the added test case.

Finally, make use of EG(exit_status) in the places where we
zend_eval_string_ex, instead of unconditionally assigning exit
code 254. If an error occurs, the error handler will already set
exit status 255.

4 years agoFixup phar test
Nikita Popov [Mon, 10 Aug 2020 08:47:18 +0000 (10:47 +0200)]
Fixup phar test

4 years agoFixed bug #77561
Nikita Popov [Mon, 10 Aug 2020 08:38:33 +0000 (10:38 +0200)]
Fixed bug #77561

Unconditionally strip shebang lines when using the CLI SAPI,
independently of whether they occur in the primary or non-primary
script. It's unlikely that someone intentionally wants to print
that shebang line when including a script, and this regularly
causes issues when scripts are used in multiple contexts, e.g.
for direct invocation and as a phar bootstrap.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Mon, 10 Aug 2020 08:12:49 +0000 (10:12 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #79947

4 years agoFixed bug #79947
Nikita Popov [Mon, 10 Aug 2020 08:08:31 +0000 (10:08 +0200)]
Fixed bug #79947

Move the FREE_OP for op_data out of the zend_binary_assign_op_dim_slow()
slow path, so it can be used by the other error path as well. This
makes ASSIGN_DIM_OP structurally more similar to ASSIGN_DIM.

4 years agoFixed bug #79946
Nikita Popov [Mon, 10 Aug 2020 07:50:55 +0000 (09:50 +0200)]
Fixed bug #79946

Declare __STDC_CONSTANT_MACROS and __STDC_FORMAT_MACROS via -D
to make sure they are declared before the first stdint.h include.
We also define these in php_stdint.h, but don't always include that
file first.

This is necessary for old compilers that use C99 rather than C11
semantics for stdint.h.

4 years agoproc_open/openpty: DragonFlyBSD build fix.
David Carlier [Sat, 8 Aug 2020 16:30:15 +0000 (17:30 +0100)]
proc_open/openpty: DragonFlyBSD build fix.

Similarly to NetBSD emalloc-ish api had been introduced into libutil.

Closes GH-5960.

4 years agoRevert "Make diff section contents red(-)/green(+) in run-tests.php"
Nikita Popov [Mon, 10 Aug 2020 07:38:48 +0000 (09:38 +0200)]
Revert "Make diff section contents red(-)/green(+) in run-tests.php"

This reverts commit 58489bd3b93e10c150933eefac05297b48213eb3.

This also uses ANSI escape code coloring for .diff files, where it
is not meaningful.

4 years agoMake diff section contents red(-)/green(+) in run-tests.php
Tyson Andre [Sun, 9 Aug 2020 15:58:08 +0000 (11:58 -0400)]
Make diff section contents red(-)/green(+) in run-tests.php

This uses green for lines with `+` and red for lines with `-`.

Colors(Red and Green) would make the failure causes stand out visually when scrolling through errors.

Closes GH-5965

4 years agoUse short array values in run-tests.php
Tyson Andre [Sun, 9 Aug 2020 19:45:04 +0000 (15:45 -0400)]
Use short array values in run-tests.php

The run-tests.php file already requires php 7 syntax.
Done automatically with phpcbf with no other changes done/planned.

This file is already using short arrays in other places.

run-tests has already been substantially refactored in PHP 8.0
compared to PHP 7.4.

This makes merge conflicts more likely, but changes to run-tests.php on older
versions are less frequent bug fixes.

4 years agoAdd many missing closing PHP tags to tests
Máté Kocsis [Sun, 9 Aug 2020 09:06:57 +0000 (11:06 +0200)]
Add many missing closing PHP tags to tests

Closes GH-5958

4 years agoFix m4 quotation
Nikita Popov [Sat, 8 Aug 2020 08:38:31 +0000 (10:38 +0200)]
Fix m4 quotation

We should not try to expand AX_CHECK_COMPILE_FLAG inside the
error message...

4 years agoPromote various warnings to Error in GMP extension
George Peter Banyard [Fri, 7 Aug 2020 16:15:25 +0000 (18:15 +0200)]
Promote various warnings to Error in GMP extension

This gets rid of most false returns

Closes GH-5882

4 years agoAdd colours to test results in run-tests.php
George Peter Banyard [Fri, 31 Jul 2020 18:02:59 +0000 (19:02 +0100)]
Add colours to test results in run-tests.php

The test runner will attempt to colourise the result of each test

The --no-color option is introduced to disable this feature.

Closes GH-5901

4 years agoDrop '#if 0' in mysqlnd_debug() from the MySQLnd extension
George Peter Banyard [Thu, 6 Aug 2020 15:27:13 +0000 (17:27 +0200)]
Drop '#if 0' in mysqlnd_debug() from the MySQLnd extension

Closes GH-5587

4 years agoRemove some duplicate iconv path logic
Nikita Popov [Fri, 7 Aug 2020 15:20:02 +0000 (17:20 +0200)]
Remove some duplicate iconv path logic

PHP_SETUP_ICONV already adds the include path to INCLUDES and the
library path to SHARED_LIBADD.

4 years agoRemove PHP_ICONV_H_PATH
Nikita Popov [Fri, 7 Aug 2020 14:11:27 +0000 (16:11 +0200)]
Remove PHP_ICONV_H_PATH

Directly include <iconv.h> instead, now that the giconv.h
distinction no longer exists.

4 years agoRemove giconv support
Nikita Popov [Fri, 7 Aug 2020 14:05:24 +0000 (16:05 +0200)]
Remove giconv support

The best information I was able to find about this is this mail
from 2009 which indicates that giconv is an old FreeBSD iconv
implementation that has long since been superseded by libiconv.

https://lists.samba.org/archive/samba-technical/2009-June/065177.html

4 years agoRemove more leftovers of PHP_DEFINE handling
Nikita Popov [Fri, 7 Aug 2020 13:54:01 +0000 (15:54 +0200)]
Remove more leftovers of PHP_DEFINE handling

4 years agoopcache gdb: Set the EI_OSABI value for NetBSD.
David Carlier [Thu, 6 Aug 2020 15:10:24 +0000 (16:10 +0100)]
opcache gdb: Set the EI_OSABI value for NetBSD.

Closes GH-5948.

4 years agoAdd another round of missing parameter types to stubs
Máté Kocsis [Fri, 7 Aug 2020 14:48:39 +0000 (16:48 +0200)]
Add another round of missing parameter types to stubs

Closes GH-5950

4 years agoFix ZPP order in ext/phar
Máté Kocsis [Fri, 7 Aug 2020 14:47:50 +0000 (16:47 +0200)]
Fix ZPP order in ext/phar

4 years agoAdd UPGRADING.INTERNALS notes for zend_object* changes
Nikita Popov [Fri, 7 Aug 2020 14:39:46 +0000 (16:39 +0200)]
Add UPGRADING.INTERNALS notes for zend_object* changes

Closes GH-5953.

4 years agoAccept zend_object* in zend_update_property
Nikita Popov [Fri, 7 Aug 2020 13:27:57 +0000 (15:27 +0200)]
Accept zend_object* in zend_update_property

4 years agoAccept zend_object* in zend_unset_property
Nikita Popov [Fri, 7 Aug 2020 13:17:59 +0000 (15:17 +0200)]
Accept zend_object* in zend_unset_property

4 years agoAccept zend_object* in zend_get_exception_base
Nikita Popov [Fri, 7 Aug 2020 13:15:50 +0000 (15:15 +0200)]
Accept zend_object* in zend_get_exception_base

4 years agoAccept zend_object in zend_read_property
Nikita Popov [Fri, 7 Aug 2020 13:05:24 +0000 (15:05 +0200)]
Accept zend_object in zend_read_property

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Fri, 7 Aug 2020 13:06:40 +0000 (15:06 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Prevent tempnam tests conflicts

4 years agoPrevent tempnam tests conflicts
Christoph M. Becker [Fri, 7 Aug 2020 12:56:54 +0000 (14:56 +0200)]
Prevent tempnam tests conflicts

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 7 Aug 2020 12:37:50 +0000 (14:37 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix bug #70574: Move files to proper locale dir

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 7 Aug 2020 12:37:36 +0000 (14:37 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #70574: Move files to proper locale dir

4 years agoFix bug #70574: Move files to proper locale dir
Florian Engelhardt [Wed, 5 Aug 2020 11:33:52 +0000 (13:33 +0200)]
Fix bug #70574: Move files to proper locale dir

Closes GH-5940.

4 years agoDon't use PHP_DEFINE in iconv
Nikita Popov [Fri, 7 Aug 2020 10:40:47 +0000 (12:40 +0200)]
Don't use PHP_DEFINE in iconv

iconv is the only consumer of this custom define mechanism that
puts every define into a single file. Use the standard mechanism
instead.

4 years agoAdd more argument types to stubs
Máté Kocsis [Wed, 5 Aug 2020 16:45:07 +0000 (18:45 +0200)]
Add more argument types to stubs

Closes GH-5943

4 years agoReapply "Explicitly validate popen mode"
Nikita Popov [Wed, 5 Aug 2020 09:27:13 +0000 (11:27 +0200)]
Reapply "Explicitly validate popen mode"

To avoid behavior differences due to libc. This time with the
check only for the non-win32 case, as Windows support additional
modifiers here (t/b).

4 years agoRevert "Explicitly validate popen mode"
Nikita Popov [Thu, 6 Aug 2020 19:53:13 +0000 (21:53 +0200)]
Revert "Explicitly validate popen mode"

This reverts commit ab36540bddb63139c3da9a9da5e5feacdf7bf7bf.

Causes a test failure on Windows.

4 years agoAdd type information to test-runner
George Peter Banyard [Thu, 6 Aug 2020 18:37:36 +0000 (20:37 +0200)]
Add type information to test-runner

Closes GH-5942

4 years agoPromote warnings to Error in FileInfo extension
George Peter Banyard [Thu, 6 Aug 2020 11:37:36 +0000 (13:37 +0200)]
Promote warnings to Error in FileInfo extension

Closes GH-5914

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 6 Aug 2020 10:35:37 +0000 (12:35 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix file clash in zlib test

4 years agoFix file clash in zlib test
Nikita Popov [Thu, 6 Aug 2020 10:34:14 +0000 (12:34 +0200)]
Fix file clash in zlib test

4 years agoMention security in step 3, as otherwise it might be overlooked
Derick Rethans [Thu, 6 Aug 2020 10:14:39 +0000 (11:14 +0100)]
Mention security in step 3, as otherwise it might be overlooked

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 6 Aug 2020 10:04:23 +0000 (12:04 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix #79934: CRLF-only line in heredoc causes parsing error

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 6 Aug 2020 10:03:57 +0000 (12:03 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79934: CRLF-only line in heredoc causes parsing error

4 years agoFix #79934: CRLF-only line in heredoc causes parsing error
Pieter van den Ham [Wed, 5 Aug 2020 18:21:26 +0000 (20:21 +0200)]
Fix #79934: CRLF-only line in heredoc causes parsing error

Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".

Closes GH-5944.

4 years agoAvoid getThis() usages in zip extension
Nikita Popov [Thu, 6 Aug 2020 09:28:35 +0000 (11:28 +0200)]
Avoid getThis() usages in zip extension

There isn't any magic going on here, we can just use ZEND_THIS
and assume it exists.

4 years agoExplicitly validate popen mode
Nikita Popov [Wed, 5 Aug 2020 09:27:13 +0000 (11:27 +0200)]
Explicitly validate popen mode

To avoid behavior differences due to libc.

4 years agoAdd GLOB_BRACE skipif
Nikita Popov [Wed, 5 Aug 2020 18:09:15 +0000 (20:09 +0200)]
Add GLOB_BRACE skipif

4 years agoTemporarily disable s390x job
Nikita Popov [Wed, 5 Aug 2020 17:58:44 +0000 (19:58 +0200)]
Temporarily disable s390x job

These aren't getting scheduled and just keep hogging jobs so
nothing else gets scheduled either.

4 years agoPrefer strtoll over atoll
Nikita Popov [Wed, 5 Aug 2020 16:36:27 +0000 (18:36 +0200)]
Prefer strtoll over atoll

Both are specified by C99, but strtoll has specified overflow
behavior while atoll does not, so prefer using it.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 16:18:51 +0000 (18:18 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Check ps -p availability in process title test
  Add privilege check in pcntl_unshare test

4 years agoCheck ps -p availability in process title test
Nikita Popov [Wed, 5 Aug 2020 10:23:27 +0000 (12:23 +0200)]
Check ps -p availability in process title test

4 years agoAdd privilege check in pcntl_unshare test
Nikita Popov [Wed, 5 Aug 2020 07:53:22 +0000 (09:53 +0200)]
Add privilege check in pcntl_unshare test

Privileges for CLONE_NEWPID were not checked.

4 years agoOnly force log startup errors if display_startup_errors disabled
Nikita Popov [Wed, 5 Aug 2020 10:57:47 +0000 (12:57 +0200)]
Only force log startup errors if display_startup_errors disabled

Otherwise this results in duplicate errors.

Closes GH-5941.

4 years agoNormalize error message capitalization
Nikita Popov [Wed, 5 Aug 2020 14:44:06 +0000 (16:44 +0200)]
Normalize error message capitalization

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 5 Aug 2020 14:42:40 +0000 (16:42 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error