]> granicus.if.org Git - php/log
php
4 years agoDon't add guard for empty()
Dmitry Stogov [Tue, 18 Aug 2020 10:13:58 +0000 (13:13 +0300)]
Don't add guard for empty()

4 years agoFixed bug #79987 (Memory leak in SplFileInfo because of missing zend_restore_error_ha...
Dmitry Stogov [Tue, 18 Aug 2020 08:08:04 +0000 (11:08 +0300)]
Fixed bug #79987 (Memory leak in SplFileInfo because of missing zend_restore_error_handling())

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 18 Aug 2020 08:03:17 +0000 (10:03 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  7.3.23 is next

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

* PHP-7.3:
  7.3.23 is next

4 years ago7.3.23 is next
Christoph M. Becker [Tue, 18 Aug 2020 07:55:37 +0000 (09:55 +0200)]
7.3.23 is next

4 years agoMerge branch 'PHP-7.4' into master
Derick Rethans [Tue, 18 Aug 2020 07:06:35 +0000 (08:06 +0100)]
Merge branch 'PHP-7.4' into master

4 years agoPrepare for 7.4.11
Derick Rethans [Tue, 18 Aug 2020 07:06:20 +0000 (08:06 +0100)]
Prepare for 7.4.11

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Tue, 18 Aug 2020 06:37:36 +0000 (08:37 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Fix HTTP response status code

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 18 Aug 2020 06:35:56 +0000 (08:35 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix HTTP response status code

4 years agoFix HTTP response status code
Christoph M. Becker [Mon, 17 Aug 2020 16:36:02 +0000 (18:36 +0200)]
Fix HTTP response status code

4 years agoJIT extension may be NULL
Dmitry Stogov [Tue, 18 Aug 2020 06:28:13 +0000 (09:28 +0300)]
JIT extension may be NULL

4 years agoFixed support for named arguments
Dmitry Stogov [Mon, 17 Aug 2020 21:12:05 +0000 (00:12 +0300)]
Fixed support for named arguments

4 years agoFixed trace type inference for FE_FETCH_R/RW
Dmitry Stogov [Mon, 17 Aug 2020 19:55:25 +0000 (22:55 +0300)]
Fixed trace type inference for FE_FETCH_R/RW

4 years agoFixed support for possible indirect variable modification (ext/standard/tests/array...
Dmitry Stogov [Mon, 17 Aug 2020 19:31:03 +0000 (22:31 +0300)]
Fixed support for possible indirect variable modification (ext/standard/tests/array/bug77135.phpt failure).

4 years agoJIT for ZEND_ISSET_ISEMPTY_CV
Dmitry Stogov [Mon, 17 Aug 2020 17:48:48 +0000 (20:48 +0300)]
JIT for ZEND_ISSET_ISEMPTY_CV

4 years agoFixed JIT for indirectly recursive traces
Dmitry Stogov [Mon, 17 Aug 2020 17:47:06 +0000 (20:47 +0300)]
Fixed JIT for indirectly recursive traces

4 years agoPromote warnings in ext/zip
George Peter Banyard [Wed, 8 Jul 2020 13:51:28 +0000 (15:51 +0200)]
Promote warnings in ext/zip

4 years agoRemoved outdated/duplicated code
Dmitry Stogov [Mon, 17 Aug 2020 12:24:33 +0000 (15:24 +0300)]
Removed outdated/duplicated code

4 years agoProperly patch jmp tables
Dmitry Stogov [Mon, 17 Aug 2020 10:50:03 +0000 (13:50 +0300)]
Properly patch jmp tables

4 years agoPromote various OpenSSL warnings into Errors
George Peter Banyard [Sun, 16 Aug 2020 16:59:52 +0000 (18:59 +0200)]
Promote various OpenSSL warnings into Errors

Closes GH-5111

4 years agoAdd `run-tests.php --context [n]` option.
Tyson Andre [Mon, 10 Aug 2020 02:07:33 +0000 (22:07 -0400)]
Add `run-tests.php --context [n]` option.

Mentioned in https://github.com/php/php-src/pull/5965#discussion_r467621123

This PR proposes 3 lines of context so the impact can be seen in tests.
Other `diff` programs show around 3 lines of context.
(This helps indicate exactly which position a test should be updated
to add a new expected line at)

Use the mapping for choosing order to display diffs

Properly include context in cases where the expected output had more lines than
the actual output, e.g.

```
--FILE--
A
A1
A
C
NEARBY
--EXPECTF--
A
B
A1
B
A
B
A
B
NEARBY
```

Closes GH-5968

4 years agoPromote warnings to exceptions in ext/curl
Máté Kocsis [Sun, 9 Aug 2020 09:05:26 +0000 (11:05 +0200)]
Promote warnings to exceptions in ext/curl

Closes GH-5963

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Fri, 14 Aug 2020 13:52:31 +0000 (15:52 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Null terminate the sodium_crypto_kx_keypair() result

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 14 Aug 2020 13:52:15 +0000 (15:52 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Null terminate the sodium_crypto_kx_keypair() result

4 years agoNull terminate the sodium_crypto_kx_keypair() result
Nikita Popov [Fri, 14 Aug 2020 13:51:00 +0000 (15:51 +0200)]
Null terminate the sodium_crypto_kx_keypair() result

4 years agoReduce cost factors in sodium password_hash tests
Nikita Popov [Fri, 14 Aug 2020 13:37:48 +0000 (15:37 +0200)]
Reduce cost factors in sodium password_hash tests

Drop the 4x factors to make these tests a bit less obscenely
slow.

4 years agoImprove test portability
Christoph M. Becker [Fri, 14 Aug 2020 13:33:02 +0000 (15:33 +0200)]
Improve test portability

We have to ensure that the attempted connection to the MySQL server
fails, and do that by passing an unknown host instead of falling back
to localhost.

4 years agoAvoid fatal error in session handler
Nikita Popov [Fri, 14 Aug 2020 13:17:52 +0000 (15:17 +0200)]
Avoid fatal error in session handler

4 years agoUse variadic signature for PDOStatement::fetchAll()
Nikita Popov [Fri, 14 Aug 2020 13:07:55 +0000 (15:07 +0200)]
Use variadic signature for PDOStatement::fetchAll()

The current signature is incorrect, because the $ctor_args parameter
is not required to be an array (it can at least also be null, and
isn't enforced by an exception anyway).

I'm going for the variadic signature here, because we already use
the same variadic signature in PDO::query() and
PDOStatement::setFetchMode(), all of them accepting essentially the
same arguments.

4 years agoFix types in openssl stub
Nikita Popov [Fri, 14 Aug 2020 12:42:54 +0000 (14:42 +0200)]
Fix types in openssl stub

These two $recipcert parameters don't use proper union types
right now. They are a bit tricky due to the $recipkey -> $recipcert
fallback.

4 years agoFix newly introduced test for Windows
Christoph M. Becker [Fri, 14 Aug 2020 12:34:24 +0000 (14:34 +0200)]
Fix newly introduced test for Windows

The warning message is rather different there, but since that is
irrelevant for this test case, we just suppress the warning.

4 years agoAdd a few callable method parameter types to ext/sqlite3
Máté Kocsis [Fri, 14 Aug 2020 09:59:25 +0000 (11:59 +0200)]
Add a few callable method parameter types to ext/sqlite3

Closes GH-5988

4 years agoDon't assert mysql->mysql is non-null
Nikita Popov [Fri, 14 Aug 2020 10:44:13 +0000 (12:44 +0200)]
Don't assert mysql->mysql is non-null

There is an edge case in constructor behavior where we can end up
with mysql->mysql being NULL (rather than mysql itself already being
NULL). I think that ultimately that's a bug in the constructor code,
and we should probably be destroying the outer structure on
construction failure as well. However it's pretty hard to unravel
with when considering all the construction permutations.

4 years agoSimplify mysqli_stmt_bind_param() implementation
Nikita Popov [Fri, 14 Aug 2020 09:32:41 +0000 (11:32 +0200)]
Simplify mysqli_stmt_bind_param() implementation

By using zpp.

4 years agoUse normal zpp in mysqli_result::__construct()
Nikita Popov [Fri, 14 Aug 2020 09:15:36 +0000 (11:15 +0200)]
Use normal zpp in mysqli_result::__construct()

This method doesn't need any special handling...

4 years agoRemove dummy aliases for mysqli constructors
Nikita Popov [Fri, 14 Aug 2020 09:12:41 +0000 (11:12 +0200)]
Remove dummy aliases for mysqli constructors

These are only available as methods. Directly declare them as
such instead of aliasing to functions that don't actually exist.

4 years agoReturn empty string from SplFileInfo::getPathname()
Nikita Popov [Fri, 14 Aug 2020 08:52:34 +0000 (10:52 +0200)]
Return empty string from SplFileInfo::getPathname()

Instead of false. This is consistent with how other methods like
SplFileInfo::getPath() behave. It's also a requirement before
SplFileInfo::__toString() calls SplFileInfo::getPathname() and
needs to return a string.

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

* PHP-7.4:
  Add missing initialization check to RegexIterator::getRegex()

4 years agoAdd missing initialization check to RegexIterator::getRegex()
Nikita Popov [Fri, 14 Aug 2020 08:27:09 +0000 (10:27 +0200)]
Add missing initialization check to RegexIterator::getRegex()

4 years agoFix test after is_callable change
Nikita Popov [Fri, 14 Aug 2020 08:40:20 +0000 (10:40 +0200)]
Fix test after is_callable change

4 years agoFix bug #78770
Nikita Popov [Fri, 14 Aug 2020 08:22:42 +0000 (10:22 +0200)]
Fix bug #78770

Refactor the zend_is_callable implementation to check callability
at a particular frame (this is an implementation detail for now,
but could be exposed in the API if useful). Pick the first parent
user frame as the one to check.

4 years agoFix ZPP for mhash()
Máté Kocsis [Thu, 13 Aug 2020 21:57:23 +0000 (23:57 +0200)]
Fix ZPP for mhash()

Closes GH-5985

4 years agoUse ZPP callable check for ldap_set_rebind_proc()
George Peter Banyard [Wed, 8 Jul 2020 16:44:34 +0000 (18:44 +0200)]
Use ZPP callable check for ldap_set_rebind_proc()

4 years agoUse ZPP callable check for Windows specific functions
George Peter Banyard [Wed, 8 Jul 2020 16:37:01 +0000 (18:37 +0200)]
Use ZPP callable check for Windows specific functions

4 years agoAllow number_format to be only passed 3 arguments
George Peter Banyard [Wed, 12 Aug 2020 17:26:54 +0000 (19:26 +0200)]
Allow number_format to be only passed 3 arguments

Closes GH-5977

4 years agoColorize --show-diff, only on stdout
Tyson Andre [Wed, 12 Aug 2020 23:27:00 +0000 (19:27 -0400)]
Colorize --show-diff, only on stdout

Don't add colors to the saved `.diff` file.

Related to a41cf3e1d2ed3ae38ad6115a8b65e5f14dae0b49

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

* PHP-7.4:
  Fixed bug #79724

4 years agoFixed bug #79724
Nikita Popov [Thu, 13 Aug 2020 09:45:05 +0000 (11:45 +0200)]
Fixed bug #79724

4 years agoAdd some missing DatePeriod initialization checks
Nikita Popov [Thu, 13 Aug 2020 15:18:50 +0000 (17:18 +0200)]
Add some missing DatePeriod initialization checks

4 years agoAdd a missing null check in simplexml
Nikita Popov [Thu, 13 Aug 2020 14:34:56 +0000 (16:34 +0200)]
Add a missing null check in simplexml

4 years agoFix invalid zpp calls in pcntl_get/setpriority
Nikita Popov [Thu, 13 Aug 2020 14:32:43 +0000 (16:32 +0200)]
Fix invalid zpp calls in pcntl_get/setpriority

4 years agoFix test after PDOStatement::fetchObject() change
Nikita Popov [Thu, 13 Aug 2020 14:45:32 +0000 (16:45 +0200)]
Fix test after PDOStatement::fetchObject() change

4 years agoUse zpp C in pg_fetch_object
Nikita Popov [Thu, 13 Aug 2020 14:24:08 +0000 (16:24 +0200)]
Use zpp C in pg_fetch_object

4 years agoUse Z_PARAM_CLASS in PDOStatement::fetchObject()
Nikita Popov [Thu, 13 Aug 2020 14:20:29 +0000 (16:20 +0200)]
Use Z_PARAM_CLASS in PDOStatement::fetchObject()

Instead of implementing custom logic.

4 years agoThrow Error on uninitialized XMLWriter
Nikita Popov [Thu, 13 Aug 2020 14:11:16 +0000 (16:11 +0200)]
Throw Error on uninitialized XMLWriter

4 years agoThrow on uninitialized SimpleXMLElement
Nikita Popov [Thu, 13 Aug 2020 13:52:17 +0000 (15:52 +0200)]
Throw on uninitialized SimpleXMLElement

Elevate this warning into an Error, as usual. Add a few checks
in places that were missing them.

4 years agoAvoid fatal error on not found class in mysqli_fetch_object()
Nikita Popov [Thu, 13 Aug 2020 12:59:39 +0000 (14:59 +0200)]
Avoid fatal error on not found class in mysqli_fetch_object()

Instead use C zpp modifier and throw TypeError.

4 years agoCheck missing parameter types in stubs
Máté Kocsis [Thu, 30 Jul 2020 12:31:47 +0000 (14:31 +0200)]
Check missing parameter types in stubs

[skip ci] Closes GH-5627

4 years agoFix param name in PHPDoc
Máté Kocsis [Thu, 13 Aug 2020 12:54:48 +0000 (14:54 +0200)]
Fix param name in PHPDoc

4 years agoAdd all the missing parameter types to stubs
Máté Kocsis [Fri, 7 Aug 2020 19:50:02 +0000 (21:50 +0200)]
Add all the missing parameter types to stubs

Closes GH-5955

4 years agoUse a dedicated method for MultipleIterator::countIterators()
Nikita Popov [Thu, 13 Aug 2020 12:39:38 +0000 (14:39 +0200)]
Use a dedicated method for MultipleIterator::countIterators()

This method has a different signature from
SplObjectStorage::count(), so don't share implementations.

4 years agoReplace fatal error in SplFileInfo with exception
Nikita Popov [Thu, 13 Aug 2020 12:35:11 +0000 (14:35 +0200)]
Replace fatal error in SplFileInfo with exception

Using RuntimeException here, because the same error condition
uses that in many other places in this file.

4 years agoThrow Error exception in DOM_GET_OBJ
Nikita Popov [Thu, 13 Aug 2020 11:15:38 +0000 (13:15 +0200)]
Throw Error exception in DOM_GET_OBJ

Per general convention for handling of uninitialized objects.

4 years agoSwitch to mime-db as source of extension => MIME map
Nikita Popov [Wed, 24 Jun 2020 15:00:32 +0000 (17:00 +0200)]
Switch to mime-db as source of extension => MIME map

The Apache MIME type map is not actively maintained anymore, so
this switches to jshttp/mime-db, which seems to be the de-facto
standard in this area now. This avoid the need to patch in our
own MIME types over time.

The preference algorithm is based on:
https://github.com/jshttp/mime-types/blob/47b62ac45e9b176a2af35532d0eea4968bb9eb6d/index.js#L154

Closes GH-5764.

4 years agoMake strftime tests musl compatible
Nikita Popov [Wed, 12 Aug 2020 15:06:02 +0000 (17:06 +0200)]
Make strftime tests musl compatible

 * Remove usage of strftime() in favor of date() in cases where
   we are not specifically testing strftime(). We implement
   date() ourselves, and as such are insulated from implementation-
   defined behavior.
 * Add skipif for broken strftime() %Z support. We have decided
   not to work around the issue for musl using manual expansion,
   as people should not be using this function anyway, and it is
   slated for future deprecation.
 * Don't test strftime() with invalid format specifier. The
   behavior is implementation-dependent.

4 years agofix test expectation
Remi Collet [Thu, 13 Aug 2020 07:36:42 +0000 (09:36 +0200)]
fix test expectation

4 years agoDrop redundant arg count check
George Peter Banyard [Thu, 13 Aug 2020 00:37:00 +0000 (02:37 +0200)]
Drop redundant arg count check

4 years agoSupport NO_COLOR environment variable in run-tests.php
Tyson Andre [Sun, 9 Aug 2020 15:26:51 +0000 (11:26 -0400)]
Support NO_COLOR environment variable in run-tests.php

And add a --color option for run-tests.php

See https://no-color.org/

> an informal standard is hereby proposed:
>
> All command-line software which outputs text with ANSI color added should check
> for the presence of a `NO_COLOR` environment variable that, when present
> (regardless of its value), prevents the addition of ANSI color.

4 years agoRecognize gnu-libiconv location on alpine
Nikita Popov [Fri, 7 Aug 2020 10:15:06 +0000 (12:15 +0200)]
Recognize gnu-libiconv location on alpine

4 years agoFix crypt_r detection under BSD system
David Carlier [Mon, 10 Aug 2020 20:16:10 +0000 (21:16 +0100)]
Fix crypt_r detection under BSD system

For BSD systems, crypt.h does not exist, instead we need to
include unistd.h.

Closes GH-5971.

4 years agoSmall CS fix
Nyholm [Wed, 12 Aug 2020 07:33:28 +0000 (09:33 +0200)]
Small CS fix

The comments were incorrectly aligned. Fix this by dropping the
alignment and moving the comments before the declarations.

Closes GH-5975.

4 years agoDisable report_zend_debug by default
Nikita Popov [Wed, 12 Aug 2020 08:32:05 +0000 (10:32 +0200)]
Disable report_zend_debug by default

We might just want to drop this completely, but at least don't
enable it by default. It already gets disabled by a number of
SAPIs, but we should make that the default state.

4 years agoRename standard array function parameters to $array
Tyson Andre [Mon, 10 Aug 2020 23:48:41 +0000 (19:48 -0400)]
Rename standard array function parameters to $array

This is targeting 8.0.

`$arg` seems like a poor choice of a name,
especially if the function were to have arguments added.

In many cases, the php.net documentation already has $array for these functions.
E.g. https://www.php.net/manual/en/function.array-intersect.php

I'd assume that since named arguments was added to 8.0 near the feature freeze,
PHP's maintainers had planned to make the names consistent
and gradually use the same name for  docs and implementation.

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>.