1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

13253 Commits

Author SHA1 Message Date
Nikita Popov a40ccd758c Fixed bug #81377
BP_VAR_UNSET should not result in undefined warnings.
2021-08-24 15:05:53 +02:00
DmitryMaksimov bdf53cc91f Dispatch using LANG_NEUTRAL instead of LOCALE_SYSTEM_DEFAULT
This is relevant wrt. case insensitive identifiers.

Closes GH-7391.
2021-08-23 14:07:23 +02:00
Ben Ramsey 90a6003835 The master branch is now for 8.1.0RC1 2021-08-17 09:40:29 -05:00
Christoph M. Becker be2df43b08 Fix #78919: CLI server: insufficient cleanup if request startup fails
We need to run the full `php_cli_server_request_shutdown()` in case of
failing `php_cli_server_request_startup()`.

Patch contributed by @cataphract.

Closes GH-7322.
2021-08-17 12:41:06 +02:00
Nikita Popov 1c6df2dffd Fixed bug #81192
Normally the filename is the current filename, but when traits
are involved, it might be a different one.
2021-08-12 14:35:13 +02:00
Nikita Popov 4a4ae45a0b Fix bug #81142 by adding zend_string_init_existing_interned()
Add a new interned string handler that fetches an interned string
if it exists, but does not create one if it does not (and instead
returns a non-interned string).

This fixes bug #81142, by preventing the creating of new interned
strings for unserialized array keys.

Closes GH-7360.
2021-08-12 11:57:50 +02:00
Philip Hofstetter ace8fba759 Fix bug #81343: inconsistent type conversion after closeCursor
S->cols is already freed in the statement destructor and since
caa710037e the column data is only
populated on the first execute() which means that on subsequent
execute()s after closeCursor was called, all meta-data for column types
was removed and never restored

Closes GH-7355.
2021-08-11 18:24:13 +02:00
Remi Collet 1100a079ed NEWS 2021-08-11 14:21:18 +02:00
Remi Collet 5d57d9073c NEWS 2021-08-11 13:04:23 +02:00
Nikita Popov 28500fe4ef Fixed bug #81349
The ascii to wchar was reporting errors using conv_illegal_output,
while it should have been using WCSGROUP_THROUGH. Effectively that
replaced illegal characters with '?' for the purpose of
identification.
2021-08-11 11:37:02 +02:00
Joe Watkins a2e051921a Fix bug #81280 refuse to allow unicode chars in prompts 2021-08-11 10:35:00 +02:00
Nikita Popov 607be654fd Fixed bug #81342
Allow arbitrary whitespace, not just horizontal spaces.
2021-08-10 17:11:40 +02:00
Derick Rethans d9c8e5a42e Fixed bug #80963: DateTimeZone::getTransitions() truncated 2021-08-08 17:27:21 +01:00
Derick Rethans 66ea59e38e Import timelib 2021.07
Fixes:
- Bug #80998 (Missing second with inverted interval). (Derick)
- Bug #81106 (Regression in 8.1: add() now truncate ->f). (Derick)
2021-08-08 17:22:06 +01:00
Derick Rethans 8426623521 Upgrade timelib to 2021.06
Fixes among others:
. Bug #79580 (date_create_from_format misses leap year).
. Bug #80974 (Wrong diff between 2 dates in different timezones).
. Bug #81097 (DateTimeZone silently falls back to UTC when providing an offset with seconds).
. Bug #81273 (Date interval calculation not correct).
2021-08-08 13:41:33 +01:00
Ben Ramsey d23e601286 The master branch is now for 8.1.0beta3 2021-08-03 08:36:49 -05:00
Remi Collet 98b9d6d9c6 NEWS 2021-08-03 12:08:27 +02:00
Joe Watkins 05ef6334cd Fix bug #81303 improve match errors 2021-08-02 17:31:26 +02:00
Nikita Popov 9d0db2e98a Fixed bug #81298
Creation of the filter may fail for some special encodings, for
which detection is not supported.
2021-07-28 10:11:46 +02:00
Nikita Popov 338a47bb85 Fix bug #63327
Use ZEND_MM_ALIGNED_SIZE for the extra size information.
I don't have a relevant system to test, but this should fix the
issue as long as required alignment is detected correctly.
2021-07-23 10:29:44 +02:00
Nikita Popov 5ac55af5e5 Add test for bug #80564
This has also been fixed by 3eb97a4566.
2021-07-23 09:45:39 +02:00
Nikita Popov 3eb97a4566 Always use separate static_members_table
When running without opcache, static_members_table is shared with
default_static_members_table. This is visible in reflection output,
because ReflectionProperty::getDefaultValue() will return the
current value, rather than the default value.

Address this by never sharing the table, which matches the behavior
we already see under opcache.

Fixes bug #80821.

Closes GH-7299.
2021-07-23 09:29:32 +02:00
Dmitry Stogov a3a74b07e5 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed Bug #80959 (infinite loop in building cfg during JIT compilation)
2021-07-21 14:34:04 +03:00
Dmitry Stogov a9991fbf28 Fixed Bug #80959 (infinite loop in building cfg during JIT compilation) 2021-07-21 14:32:44 +03:00
Dmitry Stogov 4cf7a25856 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT)
2021-07-20 22:17:41 +03:00
Dmitry Stogov 02acc5ad3b Fixed Bug #81255 (Memory leak in PHPUnit with functional JIT) 2021-07-20 22:14:32 +03:00
Ben Ramsey 718b675fb6 The master branch is now for 8.1.0beta2 2021-07-20 11:13:28 -05:00
Nikita Popov 051ff33660 Fix bug #81272: Fix func info for functions returning EMPTY_ARRAY
The empty array has refcount > 1, so we should indicate this in
func info. In most cases this renders the func info redundant,
so drop it entirely.
2021-07-20 14:40:17 +02:00
Dmitry Stogov 1e4095f03d Fixed bug #81256 (Assertion `zv != ((void *)0)' failed for "preload" with JIT) 2021-07-20 15:27:43 +03:00
Christoph M. Becker 18abfcb306 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Revert "Fix #79908: json_encode encodes negative zero as int"
2021-07-20 00:28:27 +02:00
Christoph M. Becker 2d2c001ca5 Revert "Fix #79908: json_encode encodes negative zero as int"
This reverts commit 717f1ed5e4.
2021-07-20 00:25:50 +02:00
Christoph M. Becker ef77d3c89f Fix #81206: Multiple PHP processes crash with JIT enabled
We need to avoid resetting the JIT for all SAPIs, but we need to
initialize the JIT handlers even when only reattaching on Windows.

Closes GH-7208.
2021-07-19 23:45:37 +02:00
Nikita Popov 814a932734 Add ZEND_ACC_NOT_SERIALIZABLE flag
This prevents serialization and unserialization of a class and its
children in a way that does not depend on the zend_class_serialize_deny
and zend_class_unserialize_deny handlers that will be going away
in PHP 9 together with the Serializable interface.

In stubs, `@not-serializable` can be used to set this flag.

This patch only uses the new flag for a handful of Zend classes,
converting the remainder is left for later.

Closes GH-7249.
Fixes bug #81111.
2021-07-19 15:59:11 +02:00
Dmitry Stogov 66328742ea Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81249 (Intermittent property assignment failure with JIT enabled)
2021-07-19 12:14:55 +03:00
Dmitry Stogov c0e4932816 Fixed bug #81249 (Intermittent property assignment failure with JIT enabled) 2021-07-19 12:11:09 +03:00
Dmitry Stogov 3621ce60e4 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81225 (Wrong result with pow operator with JIT enabled)
2021-07-19 10:43:08 +03:00
Dmitry Stogov 9cd437138e Fixed bug #81225 (Wrong result with pow operator with JIT enabled) 2021-07-19 10:39:52 +03:00
Christoph M. Becker 9fbcaa57aa Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #78238: BCMath returns "-0"
2021-07-16 15:56:15 +02:00
Christoph M. Becker bcb89c75ec Fix #78238: BCMath returns "-0"
There is no negative zero in the decimal system, so we must suppress
the sign.

Closes GH-7250.
2021-07-16 15:54:24 +02:00
Nikita Popov 12a858ac95 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix bug #81265: getimagesize returns 0 for 256px ICO images
2021-07-16 10:07:26 +02:00
George Dietrich 8f97f82e35 Fix bug #81265: getimagesize returns 0 for 256px ICO images
Set ICO height/width to 256 if 0.
2021-07-16 10:05:58 +02:00
Christoph M. Becker bb4dbbc150 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #80849: HTTP Status header truncation
2021-07-15 19:13:58 +02:00
Christoph M. Becker a054ef2aad Fix #80849: HTTP Status header truncation
While truncating the contents of a header is okay, we must never omit
the trailing CRLF.

Closes GH-7238.
2021-07-15 19:10:53 +02:00
Christoph M. Becker c6b7f6c39f Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #72595: php_output_handler_append illegal write access
2021-07-15 15:29:48 +02:00
Christoph M. Becker a942cf5b02 Fix #72595: php_output_handler_append illegal write access
We must make sure that `handler->buffer.size + grow_max` does not
overflow, so we're using `safe_erealloc()` instead.

Closes GH-7241.
2021-07-15 15:26:42 +02:00
Christoph M. Becker c0a1ef3e32 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #72146: Integer overflow on substr_replace
2021-07-15 12:56:12 +02:00
Christoph M. Becker 33f8dfb15a Fix #72146: Integer overflow on substr_replace
Adding two `zend_long`s may overflow, and casting `size_t` to
`zend_long` may truncate; we can avoid this here by enforcing unsigned
arithmetic.

Closes GH-7240.
2021-07-15 12:54:28 +02:00
Derick Rethans f40dcedb48 Update NEWS for 7.4.22 2021-07-13 17:21:34 +01:00
Sara Golemon 7dc35ac8a7 Bump to 8.0.10 2021-07-13 14:10:35 +00:00
Joe Watkins 6a9daafed4 Fix bug #81237 comparison of fake closures doesn't work 2021-07-13 15:35:55 +02:00