1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

121906 Commits

Author SHA1 Message Date
Derick Rethans fee80e397d Updated to version 2021.1 (2021a) 2021-01-25 10:44:06 +00:00
Derick Rethans f31538c997 Empty merge 2021-01-25 10:44:06 +00:00
Derick Rethans 3f183bbcf8 Updated to version 2021.1 (2021a) 2021-01-25 10:44:05 +00:00
Derick Rethans 072cfef1d5 Empty merge 2021-01-25 10:44:05 +00:00
Derick Rethans 491488d217 Updated to version 2021.1 (2021a) 2021-01-25 10:44:04 +00:00
Christoph M. Becker a86443f5a3 Add missing stub for SNMPException 2021-01-24 17:58:26 +01:00
Christoph M. Becker bff7761653 Add missing stub for com_exception 2021-01-24 16:06:49 +01:00
Christoph M. Becker 02933f923e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add missing SKIPIF clause for recently introduced test case
2021-01-21 17:28:41 +01:00
Christoph M. Becker edb389730d Add missing SKIPIF clause for recently introduced test case 2021-01-21 17:27:09 +01:00
Christoph M. Becker c4e63c378c Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80648: Fix for bug 79296 should be based on runtime version
2021-01-20 16:24:53 +01:00
Christoph M. Becker 6adfb8c962 Fix #80648: Fix for bug 79296 should be based on runtime version
Instead of checking for actually affected libzip versions, we now always
`ZIP_TRUNCATE` empty files unless `ZIP_RDONLY` is set.

Closes GH-6625.
2021-01-20 16:20:13 +01:00
Christoph M. Becker 0ad78817a3 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add missing SKIPIF clauses to new test cases
2021-01-20 11:04:48 +01:00
Christoph M. Becker 4c1b3e3036 Add missing SKIPIF clauses to new test cases 2021-01-20 11:02:52 +01:00
Nikita Popov 286c13e1e6 Skip preloading test on windows 2021-01-20 10:09:31 +01:00
Dmitry Stogov 6288228b56 Fixed bug #80634 (write_property handler of internal classes is skipped on preloaded JITted code) 2021-01-20 11:03:37 +03:00
Gabriel Caruso 34f0f60db5 Next is 8.0.3 2021-01-19 13:00:48 -03:00
Gabriel Caruso 9ce200f6cb Fix NEWS placeholder for the next version
This aligns with the PHP-7.4 and PHP-7.3 branches, and should
fix the `sgolemon/php-release` script run for releasing 8.0.2.
2021-01-19 12:32:17 -03:00
Derick Rethans b5599a37d7 Merge branch 'PHP-7.4' into PHP-8.0 2021-01-19 14:59:19 +00:00
Derick Rethans a33d0c3aae Update NEWS and version 2021-01-19 14:58:38 +00:00
Derick Rethans e8a89c49db Update NEWS for PHP 7.4.15RC1 2021-01-19 14:44:32 +00:00
Nikita Popov f3415758d1 Fix observer tests on Windows
Use %e instead of a hardcoded forward slash.
2021-01-19 15:27:14 +01:00
Nikita Popov 05d168013a Fixed bug #80644: ResourceBundle::get() doesn't reset error state 2021-01-19 15:20:55 +01:00
Nikita Popov 1bdd8f7ae4 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #42560
2021-01-19 11:44:22 +01:00
sj-i 5d31ee302d Fixed bug #42560
Check open_basedir after the fallback to the system's temporary
directory in tempnam().

In order to preserve the current behavior of upload_tmp_dir
(do not check explicitly specified dir, but check fallback),
new flags are added to check open_basedir for explicit dir
and for fallback.

Closes GH-6526.
2021-01-19 11:41:58 +01:00
Christoph M. Becker f33105dcb6 ldap_search() and friends can return array
See the description of <https://www.php.net/ldap-search>, and also the
implementation.

Closes GH-6620.
2021-01-19 10:35:17 +01:00
Christoph M. Becker cfae999f1b Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
2021-01-19 10:30:28 +01:00
Christoph M. Becker 68f5289e9e Fix #69279: Compressed ZIP Phar extractTo() creates garbage files
When extracting compressed files from an uncompressed Phar, we must not
use the direct file pointer, but rather get an uncompressed file
pointer.

We also add a test to show that deflated and stored entries are
properly extracted.

This also fixes #79912, which appears to be a duplicate of #69279.

Co-authored-by: Anna Filina <afilina@gmail.com>

Closes GH-6599.
2021-01-19 10:28:54 +01:00
Dylan K. Taylor 872f302b8d Keep JIT region executable under ZTS
When one thread tries to compile a script, another thread may
already be executing JITed code. In this case we can't make the
memory non-executable.

This violates the W^X principle, but doesn't seem to be avoidable
for ZTS builds for now. The same problem does not exist for NTS,
as it's a different process executing there, which has it's own
memory protection mapping.

Closes GH-6595.
2021-01-19 10:25:42 +01:00
Nikita Popov fbd8e20ed5 Observe unused return values in JIT
Even if the return value is not used, it should still be available
to the observer.
2021-01-19 10:09:53 +01:00
Nikita Popov dd7d829896 Disable opcache optimizations during some observer tests
Opcache inlines functions that only return a constant. Disable
optimizations to prevent differences in tests where such functions
are used (or rewrite the test to not depend on it).
2021-01-19 10:02:08 +01:00
Nikita Popov f2364f316d SplFileObject::fgets() cannot return false
spl_filesystem_file_read() is called with silent=0, so it will
throw on failure.
2021-01-18 16:47:21 +01:00
Nikita Popov 7290dc4dcf Sync gzgets signature with fgets 2021-01-18 15:47:12 +01:00
Nikita Popov ebf461a025 Sync datefmt_get_calendar_object signature
In this case, it's only a matter of using the same type order
in both cases.
2021-01-18 14:39:32 +01:00
Nikita Popov 39077deea5 Sync intlcal_create_instance() and IntlCalendar::createInstance()
Remove the explicit mention of IntlGregorianCalendar in the latter.
It is a subclass of IntlCalendar, and as such covered if only
IntlCalendar is used as the return type.
2021-01-18 14:39:32 +01:00
Nikita Popov c31f9f7ee4 Sync date_diff and DateTime::diff return type
This function/method cannot return false.
2021-01-18 14:39:32 +01:00
Nikita Popov 48e2e5324e Fix parameter name of PharData::getMetadata()
The name should be the same as for Phar::getMetadata().
2021-01-18 14:09:00 +01:00
Dylan K. Taylor 0aad77418d Fix stub for Phar::setStub()
This fixes multiple issues:
 * The first parameter may be resource|string.
 * It's an overloaded signature. The second parameter cannot be
   passed if the first one is a string. Use UNKNOWN default
   value for that reason.
 * Make parameter names in PharData::setStub() match those in
   Phar.

Closes GH-6596.
2021-01-18 12:59:18 +01:00
Christoph M. Becker c321896a37 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80595: Resetting POSTFIELDS to empty array breaks request
2021-01-18 11:01:01 +01:00
Christoph M. Becker 38ad37ad43 Fix #80595: Resetting POSTFIELDS to empty array breaks request
This is mainly to work around https://github.com/curl/curl/issues/6455,
but not building the mime structure for empty hashtables is a general
performance optimization, so we do not restrict it to affected cURL
versions (7.56.0 to 7.75.0).

The minor change to bug79033.phpt is unexpected, but should not matter
in practice.

Closes GH-6606.
2021-01-18 10:57:56 +01:00
Nikita Popov 880bf62224 Fixed bug #80617: Type narrowing warning in ZEND_TYPE_INIT_CODE 2021-01-14 10:08:22 +01:00
Daniil Gentili f9fbba41b6 Fixed bug #80596: Fix anonymous class union typehint errors
Cut off part after null byte when resolving the class name, to
avoid cutting off a larger part lateron.

Closes GH-6601.
2021-01-14 10:04:27 +01:00
Dmitry Stogov 3edf5c969a Fixed bug #80422 (php_opcache.dll crashes when using Apache 2.4 with JIT) 2021-01-14 08:16:27 +03:00
Christoph M. Becker 41e9a8ebdc socket_create_pair() can no longer return NULL
Closes GH-6592.
2021-01-12 12:08:31 +01:00
David CARLIER 7a049cd6a4 Use arc4random_buf on macOS
macOS uses an AES based arc4random_buf implementation since at least
macOS 10.2.

Closes GH-6591.
2021-01-12 10:42:09 +01:00
Nikita Popov 973138f39d Add support for union types for internal functions
This closes the last hole in the supported types for internal
function arginfo types. It's now possible to represent unions of
multiple classes. This is done by storing them as TypeA|TypeB and
PHP will then convert this into an appropriate union type list.

Closes GH-6581.
2021-01-12 10:14:41 +01:00
Nikita Popov bc0f78a2da Use ephemeral port in socket_create_listen_used.phpt
Avoid parallelism issues.
2021-01-12 10:09:30 +01:00
Jens de Nies 94a151a018 Fixed bug #80545
This converts the remaining "non well-formed" warnings in bcmath
to ValueErrors, in line with the other warning promotions that
have been performed in this extension.

Closes GH-80545.
2021-01-12 09:50:27 +01:00
Christoph M. Becker 95a13ca989 Revert fix for bug 76813 and re2c version bump
CentOS 7 ships with re2c 0.13.5 by default, so we should not have
bumped the required re2c version to 0.13.7.  However, 0.13.5 does not
support default rules, so we cannot use them to fix bug 76813.

This reverts commit 420184ad52 and
5e15c9c41f.

Closes GH-6593.
2021-01-11 17:19:52 +01:00
Christoph M. Becker 52ed45745e Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Fix #76813: Access violation near NULL on source operand"
2021-01-11 13:21:56 +01:00
Christoph M. Becker 25103c37aa Revert "Fix #76813: Access violation near NULL on source operand"
This reverts commit 5e15c9c41f, since
re2c default rules are only available as of re2c 0.13.7.
2021-01-11 13:21:12 +01:00