]>
granicus.if.org Git - php/log
George Peter Banyard [Tue, 31 Mar 2020 18:02:00 +0000 (20:02 +0200)]
Encoding argument is always MBREX(current_mbctype)
Nikita Popov [Tue, 31 Mar 2020 16:35:17 +0000 (18:35 +0200)]
Add additional operator exception handling tests
These show that we may lose the old value of the LHS of a compound
assignment operator in some cases.
Nikita Popov [Tue, 31 Mar 2020 15:31:14 +0000 (17:31 +0200)]
Remove unused argument form convert_object_to_type()
Máté Kocsis [Mon, 30 Mar 2020 20:49:55 +0000 (22:49 +0200)]
Display nullability in type error messages for internal functions
Closes GH-5327
Nikita Popov [Tue, 31 Mar 2020 12:52:59 +0000 (14:52 +0200)]
Clean up silent/noisy flag in convert_to_number
George Peter Banyard [Sat, 28 Mar 2020 19:31:18 +0000 (20:31 +0100)]
Convert some unknown encoding warnings to ValueErrors in ext/mbstring
Promotes only the warnings where the encoding comes only from a string.
Functions which accept an array of encodings will be fixed at a later stage.
Closes GH-5317
George Peter Banyard [Sun, 29 Mar 2020 22:40:18 +0000 (00:40 +0200)]
Promote some warnings to Errors in Zend basic functions
Closes GH-5325
Derick Rethans [Tue, 31 Mar 2020 14:01:07 +0000 (15:01 +0100)]
Merge branch 'PHP-7.4'
Derick Rethans [Tue, 31 Mar 2020 13:57:12 +0000 (14:57 +0100)]
The 7.4 branch is now for 7.4.6
Nikita Popov [Tue, 31 Mar 2020 10:17:32 +0000 (12:17 +0200)]
Make cast_object handler required
Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.
If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.
Máté Kocsis [Mon, 30 Mar 2020 15:23:03 +0000 (17:23 +0200)]
Improve undefined variable error messages
Closes GH-5312
Nikita Popov [Tue, 31 Mar 2020 10:48:57 +0000 (12:48 +0200)]
Clarify SimpleXML comparison logic
Nikita Popov [Tue, 31 Mar 2020 10:36:48 +0000 (12:36 +0200)]
Add a ZEND_UNCOMPARABLE value
To explicitly indicate that objects are uncomparable. For now
this has no functional difference from the usual 1 return value,
but makes intent clearer.
Nikita Popov [Tue, 31 Mar 2020 10:04:59 +0000 (12:04 +0200)]
Report object cast failures internally
Make cast_object return FAILURE for casts to int/float, rather than
throwing a notice and returning SUCCESS. Instead move the emission
of the notice to the code invoking cast_object. This will allow us
to customize the behavior per call-site.
This change is written to be NFC, and the code in
zend_std_compare_objects() should illustrate the current behavior
doesn't make a lot of sense.
Nikita Popov [Tue, 31 Mar 2020 09:06:15 +0000 (11:06 +0200)]
Make sure php_get_internal_encoding() returns non-empty
Even if default_charset is set to "", we should still return
"UTF-8" as the default value here. Setting default_charset to ""
suppresses the header emission, but shouldn't change anything
about our encoding defaults.
Nikita Popov [Tue, 31 Mar 2020 08:46:44 +0000 (10:46 +0200)]
Make sure mbstring.internal_encoding deprecation is always thrown
It was not thrown if the setting was specified via -d at least.
Christoph M. Becker [Tue, 31 Mar 2020 08:26:01 +0000 (10:26 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Next is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 08:24:15 +0000 (10:24 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Next is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 08:22:55 +0000 (10:22 +0200)]
Next is 7.3.18
Christoph M. Becker [Tue, 31 Mar 2020 06:41:08 +0000 (08:41 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79413: session_create_id() fails for active sessions
Christoph M. Becker [Tue, 31 Mar 2020 06:39:34 +0000 (08:39 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79413: session_create_id() fails for active sessions
Christoph M. Becker [Thu, 26 Mar 2020 18:01:33 +0000 (19:01 +0100)]
Fix #79413: session_create_id() fails for active sessions
The comment on `PS_VALIDATE_SID_FUNC(files)` is very clear that the
function is supposed to return `SUCCESS` if the session already exists.
So to detect a collision, we have to check for `SUCCESS`, not
`FAILURE`.
We also fix the wrong condition in session_regenerate_id() as well.
George Peter Banyard [Sun, 29 Mar 2020 00:10:15 +0000 (01:10 +0100)]
Drop wchar header check as always defined since C95
George Peter Banyard [Mon, 30 Mar 2020 02:11:12 +0000 (04:11 +0200)]
Fix format for tm member objects as they are stored as integers
Closes GH-5326
Nikita Popov [Mon, 30 Mar 2020 14:27:38 +0000 (16:27 +0200)]
Clarify that return throws
Nikita Popov [Mon, 30 Mar 2020 14:26:28 +0000 (16:26 +0200)]
mb_detect_order(): Use proper array|string argument
Nikita Popov [Mon, 30 Mar 2020 14:17:35 +0000 (16:17 +0200)]
Remove persistent arg from parse_encoding_array()
It is always zero.
Nikita Popov [Mon, 30 Mar 2020 14:13:36 +0000 (16:13 +0200)]
mb_check_encoding(): Make var a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 14:06:41 +0000 (16:06 +0200)]
mb_detect_encoding(): Use proper array|string parameter
Needed to add support for nullabiltiy in some places.
Tyson Andre [Sun, 29 Mar 2020 21:42:11 +0000 (17:42 -0400)]
Do constant evaluation for str_contains in opcache
Both arguments must be strings.
str_contains deliberately does not emit a warning for an empty needle.
Closes GH-5324
Nikita Popov [Mon, 30 Mar 2020 13:51:04 +0000 (15:51 +0200)]
mb_convert_variables(): Make $from an array|string argument
Nikita Popov [Mon, 30 Mar 2020 13:41:55 +0000 (15:41 +0200)]
mb_convert_encoding(): Make $input a proper array|string arg
Nikita Popov [Mon, 30 Mar 2020 13:39:13 +0000 (15:39 +0200)]
mb_convert_encoding(): Make $from_encodings a proper array|string arg
Switching to FastZPP, as we don't support this in normal zpp.
Michael Voříšek [Fri, 27 Mar 2020 10:53:37 +0000 (11:53 +0100)]
Add test to make sure that (self::class)::method() is not forwarding LSB
Related with Bug #79419.
Closes GH-5310.
Nikita Popov [Mon, 30 Mar 2020 12:15:16 +0000 (14:15 +0200)]
Parse mb_convert_encoding() encodings only once
Instead of re-parsing them for every converted value. Also reuse
the generic parse_array() helper.
Nikita Popov [Mon, 30 Mar 2020 12:46:10 +0000 (14:46 +0200)]
Properly report unknown encoding in encoding lists
And clean up the related array and list parsing code.
Dmitry Stogov [Mon, 30 Mar 2020 11:27:01 +0000 (14:27 +0300)]
cleanup
Nikita Popov [Mon, 30 Mar 2020 10:29:11 +0000 (12:29 +0200)]
Move encoding fetching outside php_mb_stripos()
Nikita Popov [Mon, 30 Mar 2020 10:10:52 +0000 (12:10 +0200)]
Remove unnecessary NULL check
This is a required zpp parameter, it cannot be null.
Dmitry Stogov [Mon, 30 Mar 2020 09:50:19 +0000 (12:50 +0300)]
Initialize variable numbers
Nikita Popov [Mon, 30 Mar 2020 08:58:33 +0000 (10:58 +0200)]
Disable Symfony test on PHP 8
Symfony is currently has an expected incompatibility with PHP 8:
Fatal error: Declaration of Symfony\Component\HttpClient\Response\MockResponse::schedule(Symfony\Component\HttpClient\Response\MockResponse $response, array &$runningResponses): void must be compatible with Symfony\Component\HttpClient\Response\ResponseTrait::schedule(Symfony\Component\HttpClient\Response\ResponseTrait $response, array &$runningResponses): void in /home/vsts/work/1/s/symfony/src/Symfony/Component/HttpClient/Response/MockResponse.php on line 135
Disable the job until this is fixed.
Nikita Popov [Mon, 30 Mar 2020 08:54:34 +0000 (10:54 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Don't check directory nlink in stat tests
Nikita Popov [Mon, 30 Mar 2020 08:52:25 +0000 (10:52 +0200)]
Don't check directory nlink in stat tests
It seems like on many filesystems nlink for directories is the
number of subdirectories (plus two, due to . and ..). However,
this is not a POSIX requirement, and some filesystems don't
implement it this way. This seems to be the case for whatever is
used on the Travis AArch64 builders now.
Nikita Popov [Mon, 30 Mar 2020 08:37:12 +0000 (10:37 +0200)]
SCCP: Optimize strpos with empty needle
This is no longer special cases in PHP 8.
Christoph M. Becker [Mon, 30 Mar 2020 07:18:20 +0000 (09:18 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #74940: DateTimeZone loose comparison always true
Christoph M. Becker [Wed, 4 Mar 2020 18:20:10 +0000 (19:20 +0100)]
Fix #74940: DateTimeZone loose comparison always true
Since `DateTimeZone` does not implement a `compare_objects` handler,
nor has any properties, two `DateTimeZone` instances always compare as
being equal, even if they designate totally different timezones. Even
worse, after calling `var_dump()` on these objects, the actual
comparison may yield a correct result.
We therefore introduce a `compare_objects` handlers, which prevents
different behavior before/after `var_dump()`, and which allows us to
clearly define the intended semantics.
Christoph M. Becker [Mon, 30 Mar 2020 06:58:45 +0000 (08:58 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix #79427: Integer Overflow in shmop_open()
Christoph M. Becker [Mon, 30 Mar 2020 06:57:29 +0000 (08:57 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79427: Integer Overflow in shmop_open()
Christoph M. Becker [Sun, 29 Mar 2020 14:56:57 +0000 (16:56 +0200)]
Fix #79427: Integer Overflow in shmop_open()
If `shm.shm_segsz > ZEND_LONG_MAX` the assignment to `shmop->size` a
few lines below would overflow, so we catch that early and bail out if
necessary.
Jakub Zelenka [Sun, 29 Mar 2020 19:21:24 +0000 (20:21 +0100)]
Merge branch 'PHP-7.4'
Andre Nathan [Tue, 4 Feb 2020 12:53:16 +0000 (09:53 -0300)]
Allow numeric [UG]ID in FPM listen.{owner,group}
Remi Collet [Sun, 29 Mar 2020 12:24:12 +0000 (14:24 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
NEWS
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
Remi Collet [Sun, 29 Mar 2020 12:23:28 +0000 (14:23 +0200)]
NEWS
Remi Collet [Sun, 29 Mar 2020 12:23:03 +0000 (14:23 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
Max Rees [Fri, 27 Mar 2020 17:57:24 +0000 (12:57 -0500)]
Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This breaks on Linux with the musl libc, since it zeroes out gl_pathc during
globfree.
Dmitry Stogov [Fri, 27 Mar 2020 12:20:21 +0000 (15:20 +0300)]
BIND_GLOBAL and BIND_STATIC don't use value of the first operand
Christoph M. Becker [Fri, 13 Mar 2020 14:48:53 +0000 (15:48 +0100)]
Fix #76999: mb_regex_set_options() return current options
When setting new options, `mb_regex_set_options()` is supposed to
return the *previous* options.
Dmitry Stogov [Fri, 27 Mar 2020 09:24:15 +0000 (12:24 +0300)]
Removed useless variable
Christoph M. Becker [Thu, 26 Mar 2020 22:17:37 +0000 (23:17 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add missing 'skip' to bug79332.phpt skip message
Christoph M. Becker [Thu, 26 Mar 2020 22:15:55 +0000 (23:15 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Add missing 'skip' to bug79332.phpt skip message
Lukas Berger [Thu, 26 Mar 2020 17:39:39 +0000 (10:39 -0700)]
Add missing 'skip' to bug79332.phpt skip message
The skip message must start with the word 'skip', otherwise the test will not be skipped.
*Before:*
Running selected tests.
TEST 1/1 [ext/com_dotnet/tests/bug79332.phpt]
========DIFF========
001+ Fatal error: Uncaught Error: Class 'COMPersistHelper' not found in /srv/php/ext/com_dotnet/tests/bug79332.php:2
001- A com_exception has been thrown
002+ Stack trace:
003+ #0 {main}
004+ thrown in /srv/php/ext/com_dotnet/tests/bug79332.php on line 2
========DONE========
FAIL Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt]
*After:*
Running selected tests.
SKIP Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] reason: com_dotnet extension not available
Nikita Popov [Thu, 26 Mar 2020 10:49:27 +0000 (11:49 +0100)]
Remove rand_r implementation
We already use our own mt13397 implementation nowadays, so we no
longer need this shim.
Nikita Popov [Mon, 23 Mar 2020 09:18:00 +0000 (10:18 +0100)]
Remove HAVE_REALPATH checks
We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.
Closes GH-5290.
Nikita Popov [Thu, 23 Mar 2017 15:14:39 +0000 (16:14 +0100)]
Add PhpToken class
RFC: https://wiki.php.net/rfc/token_as_object
Relative to the RFC, this also adds a __toString() method,
as discussed on list.
Closes GH-5176.
Nikita Popov [Thu, 9 Jan 2020 14:04:33 +0000 (15:04 +0100)]
Check abstract method signatures coming from traits
RFC: https://wiki.php.net/rfc/abstract_trait_method_validation
Closes GH-5068.
Dmitry Stogov [Thu, 26 Mar 2020 07:29:34 +0000 (10:29 +0300)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Explicitly declare the char as signed in zend_ffi_val.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
George Peter Banyard [Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)]
Explicitly declare the char as signed in zend_ffi_val.
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.
Christoph M. Becker [Wed, 25 Mar 2020 21:49:57 +0000 (22:49 +0100)]
Fix php_exec() output length
If trailing whitespace is stripped, we have to propagate the change of
`bufl` back to php_exec().
George Peter Banyard [Wed, 25 Mar 2020 20:44:03 +0000 (21:44 +0100)]
Fix -Wtype-limits warning by using correct type declaration in JIT trace
Namely int as that is the type of 'definition'
Closes GH-5299
Dmitry Stogov [Wed, 25 Mar 2020 20:09:32 +0000 (23:09 +0300)]
Separate zend_jit_var_supports_reg() and cleanup
Dmitry Stogov [Wed, 25 Mar 2020 20:07:21 +0000 (23:07 +0300)]
Fixed incorrect "TSSA start" headers
Dmitry Stogov [Wed, 25 Mar 2020 14:38:08 +0000 (17:38 +0300)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Dmitry Stogov [Wed, 25 Mar 2020 14:31:33 +0000 (17:31 +0300)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Dmitry Stogov [Wed, 25 Mar 2020 14:31:06 +0000 (17:31 +0300)]
Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script).
Máté Kocsis [Wed, 25 Mar 2020 11:33:38 +0000 (12:33 +0100)]
Fix #75958 Return void instead of true
Máté Kocsis [Wed, 25 Mar 2020 08:24:52 +0000 (09:24 +0100)]
Add stubs for SplDoublyLinkedList
Closes GH-5293
Dmitry Stogov [Wed, 25 Mar 2020 10:22:01 +0000 (13:22 +0300)]
Add new line before basic-block labels (except for the first BB0)
Dmitry Stogov [Wed, 25 Mar 2020 09:42:04 +0000 (12:42 +0300)]
Always print numeric opline numbers
Nikita Popov [Wed, 25 Mar 2020 10:11:30 +0000 (11:11 +0100)]
Clean up php_exec() implementation a bit
Nikita Popov [Wed, 25 Mar 2020 09:51:32 +0000 (10:51 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Nikita Popov [Wed, 25 Mar 2020 09:50:57 +0000 (10:50 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Christian Schneider [Tue, 24 Mar 2020 15:43:17 +0000 (16:43 +0100)]
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Closes GH-5292.
Dmitry Stogov [Wed, 25 Mar 2020 07:49:01 +0000 (10:49 +0300)]
Rename "var" to "stack". This is an abstract stack that holds TSSA variable numbers.
Dmitry Stogov [Tue, 24 Mar 2020 19:44:11 +0000 (22:44 +0300)]
Make SSA dump format controlled by opcache.jit_debug more readable (always print opcode number).
This doesn't affect dumps controlled by opcache.opt_debug_level.
Máté Kocsis [Wed, 18 Mar 2020 19:58:45 +0000 (20:58 +0100)]
Improve error messages of ext/hash
Closes GH-5275
Máté Kocsis [Wed, 18 Mar 2020 19:58:37 +0000 (20:58 +0100)]
Promote warnings to exceptions in ext/hash
Máté Kocsis [Sun, 22 Mar 2020 18:27:00 +0000 (19:27 +0100)]
Add stubs for SPL iterators
Closes GH-5286
Máté Kocsis [Wed, 18 Mar 2020 21:44:02 +0000 (22:44 +0100)]
Improve error messages of various extensions
Closes GH-5278
Máté Kocsis [Wed, 18 Mar 2020 20:39:56 +0000 (21:39 +0100)]
Improve error messages of ext/reflection
Closes GH-5277
Nikita Popov [Mon, 23 Mar 2020 16:14:42 +0000 (17:14 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Add test file
Nikita Popov [Mon, 23 Mar 2020 16:14:16 +0000 (17:14 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Add test file
Nikita Popov [Mon, 23 Mar 2020 16:13:57 +0000 (17:13 +0100)]
Add test file
Forgot the git add again...
Nikita Popov [Mon, 23 Mar 2020 16:12:55 +0000 (17:12 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Handle NULL caller_call_opline
Nikita Popov [Mon, 23 Mar 2020 16:12:12 +0000 (17:12 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Handle NULL caller_call_opline
Nikita Popov [Mon, 23 Mar 2020 16:10:54 +0000 (17:10 +0100)]
Handle NULL caller_call_opline
This can happen if there is an EXIT in the call arguments, in which
case the DO_CALL opcode may be eliminated as unreachable.
Christoph M. Becker [Mon, 23 Mar 2020 15:33:26 +0000 (16:33 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix leak on Windows as well
Christoph M. Becker [Mon, 23 Mar 2020 15:31:45 +0000 (16:31 +0100)]
Fix leak on Windows as well
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=
db08ef0d3274b239a6b9e68d71d02bb6acb71d82 >
Christoph M. Becker [Mon, 23 Mar 2020 15:26:19 +0000 (16:26 +0100)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix test for Windows
Christoph M. Becker [Mon, 23 Mar 2020 15:23:33 +0000 (16:23 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix test for Windows