1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Commit Graph

116670 Commits

Author SHA1 Message Date
Máté Kocsis beee92a887 Remove support for mixing parameter order in implode() 2019-12-12 13:49:05 +01:00
Máté Kocsis 37c1171451 Promote warnings to exceptions in password_*() functions 2019-12-12 12:14:53 +01:00
Nikita Popov d56768817b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78950: Preloading trait method with static variables
2019-12-12 11:52:51 +01:00
Nikita Popov be89a5c7f1 Fixed bug #78950: Preloading trait method with static variables
We need to make sure that trait methods with static variables
allocate a separate MAP slot for the static variables pointer,
rather than working in-place.
2019-12-12 11:52:43 +01:00
Nikita Popov cf9362195b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix handling of non-final loop var free in sccp
2019-12-12 09:40:54 +01:00
Nikita Popov 2d03b638dc Fix handling of non-final loop var free in sccp
We only need to preserve the FE_FREE that marks the end of the
loop range. Skip FE_FREEs with the FREE_ON_RETURN flag.
2019-12-12 09:39:52 +01:00
Tyson Andre 1695d3ed07 Add funcinfo for spl global functions
This assumes that `iterator_*` will now always throw or abort on failure.

Also, move #include _arginfo.h directive to the top of the file - virtually all
other files put it there, and developers may base code on basic_functions.c.

Closes GH-4968
2019-12-11 18:17:04 -05:00
George Peter Banyard 4782e8e28a Return empty string instead of NULL in serialize().
Modifiy its return type accordingly and arginfo.
2019-12-12 00:01:28 +01:00
Christoph M. Becker 15340bea04 Merge branch 'PHP-7.4'
* PHP-7.4:
  uint/ulong removal may affect other platforms as well
2019-12-11 23:45:03 +01:00
Christoph M. Becker 86aac3eed2 uint/ulong removal may affect other platforms as well 2019-12-11 23:44:46 +01:00
Christoph M. Becker e161c7bd89 Merge branch 'PHP-7.4'
* PHP-7.4:
  Typo fix in php.ini-production
2019-12-11 23:16:05 +01:00
Adrian Verde 2bf38aff79 Typo fix in php.ini-production
Possibe -> Possible
2019-12-11 23:15:07 +01:00
Máté Kocsis 51eefd8079 Add stubs for standard library 2019-12-11 18:50:36 +01:00
Máté Kocsis 381c9c180b Promote warnings to exceptions in sapi_windows_* functions 2019-12-11 18:48:14 +01:00
Máté Kocsis 3b0a1905dd Promote warning to exception in unserialize() 2019-12-11 18:47:59 +01:00
Máté Kocsis f0b5d55c6f Promote warning to exception in parse_url() 2019-12-11 18:47:48 +01:00
Máté Kocsis 555eec7d86 Promote warnings to exceptions for some filter functions 2019-12-11 18:47:17 +01:00
Tyson Andre c31229429b Merge branch 'array_filter-optimize' into HEAD 2019-12-11 09:40:13 -05:00
Nikita Popov 231bc7c8be Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Fixed bug #78903: Conflict in RTD key for closures results in crash"
2019-12-11 14:40:02 +01:00
Nikita Popov 502cd7b1f1 Revert "Fixed bug #78903: Conflict in RTD key for closures results in crash"
This reverts commit b55033fa18.

This breaks ext/opcache/tests/bug65915.phpt.
2019-12-11 14:38:48 +01:00
George Peter Banyard a90abe2064 Convert warnings to TypeError in php_spl.c
Closes GH-4991
2019-12-11 13:49:16 +01:00
Nikita Popov 33648585d6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78903: Conflict in RTD key for closures results in crash
2019-12-11 13:08:12 +01:00
Nikita Popov b55033fa18 Fixed bug #78903: Conflict in RTD key for closures results in crash
I wasn't able to create a simple reproducer for this. General approach
is the same as for anonymous classes: If the key is already used, reuse
the old definition.
2019-12-11 13:07:45 +01:00
Nikita Popov 05e6a11b5b Remove ZEND_PARSE_PARAMS_QUIET from spl_autoload_register() 2019-12-11 11:15:02 +01:00
Nikita Popov e2a1dbd502 Merge branch 'PHP-7.4'
* PHP-7.4:
  Free RSA public key in mysqlnd sha256 auth
2019-12-11 10:32:06 +01:00
Nikita Popov b6a59cee47 Free RSA public key in mysqlnd sha256 auth
Not sure why this only started showing up as a leak now.
2019-12-11 10:31:56 +01:00
Dmitry Stogov ee45dbab37 Merge branch 'PHP-7.4'
* PHP-7.4:
  Addirional fix for bug #78918
2019-12-11 12:29:10 +03:00
Dmitry Stogov 3280209c03 Addirional fix for bug #78918 2019-12-11 12:21:49 +03:00
Tyson Andre 366713d250 Speed up array_intersect/array_diff/array_filter
Use zend_hash_update instead of zend_hash_add.

These are taking a subset of keys from an array with unique keys,
so the result should also have unique keys.
(this is already done for array_map())

Also, speed up array_intersect and array_diff slightly by
using ZEND_HASH_FOREACH macros.
This way, it doesn't need to load the same buckets and array counts
from memory every time (compiler previously couldn't infer they won't change)

```php
<?php
// $n=10000 now takes 0.095 seconds instead of 0.102
function test_bench(int $n) {
    $values = range(0,1000);
    $other = range(0,1000);
    unset($other[500]);
    unset($values[400]);

    $total = 0;
    for ($i = 0; $i < $n; $i++) {
        $total += count(array_intersect_key($values, $other));
    }
    return $total;
}
```
2019-12-10 19:29:49 -05:00
Dmitry Stogov 8fb3ef6e37 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78937 (Preloading unlinkable anonymous class can segfault)
2019-12-11 00:47:15 +03:00
Dmitry Stogov 20ef51db22 Fixed bug #78937 (Preloading unlinkable anonymous class can segfault) 2019-12-11 00:46:30 +03:00
Dmitry Stogov 764c8159b7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix error message
2019-12-10 22:17:42 +03:00
Dmitry Stogov 518a8f89c1 Fix error message 2019-12-10 22:17:10 +03:00
Derick Rethans 4f31bcbf2f Merge branch 'PHP-7.4' 2019-12-10 16:59:09 +00:00
Derick Rethans 2badeb511b PHP-7.4 is now 7.4.2-dev 2019-12-10 16:56:33 +00:00
Nikita Popov 725c2a999d Merge branch 'PHP-7.4'
* PHP-7.4:
  Set zend.exception_ignore_args=0 in run-tests.php
2019-12-10 16:16:03 +01:00
Nikita Popov e87dc32569 Set zend.exception_ignore_args=0 in run-tests.php
Any existing tests are going to be written under this assumption...
2019-12-10 16:15:26 +01:00
Nikita Popov c2d92ad971 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix incorrect zend_try usage
2019-12-10 15:22:46 +01:00
Nikita Popov 5ddcacac2e Fix incorrect zend_try usage 2019-12-10 15:22:31 +01:00
Nikita Popov fa18c115be Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix release build failure
2019-12-10 13:53:19 +01:00
Nikita Popov d6f86caa11 Fix release build failure
GCC complained about potentially uninitialized __orig_bailout,
even though the variable has an initializer. This warning was
quite persistent, I was only able to avoid it by using a separate
function.

Am I missing something?
2019-12-10 13:51:09 +01:00
Christoph M. Becker f2dbe4297b Merge branch 'PHP-7.4'
* PHP-7.4:
  Improve error message
2019-12-10 13:20:55 +01:00
Christoph M. Becker 9e22c3d4d9 Improve error message
Formerly, the error message was like:

| Can't preload unlinked class MyException: Internal parent (Windows
| only limitation)Exception

Now it's like:

| Can't preload unlinked class MyException: Windows can't link to
| internal parent Exception
2019-12-10 13:19:58 +01:00
Nikita Popov 5cdea8d5e8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add support for class_alias to preloading
  Fixed bug #78935: Check that all linked classes can be preloaded
2019-12-10 13:12:29 +01:00
Nikita Popov baf3a9133b Add support for class_alias to preloading
Related to bug #78918.
2019-12-10 13:06:36 +01:00
Nikita Popov 3f86adb0ef Fixed bug #78935: Check that all linked classes can be preloaded
During preloading, check that all classes that have been included
as part of the preload script itself (rather than through opcache_compile_file)
can actually be preloaded, i.e. satisfy Windows restrictions, have
resolved initializers and resolved property types. When resolving
initializers and property types, also autoload additional classes.
Because of this, the resolution runs in a loop.
2019-12-10 13:05:48 +01:00
Máté Kocsis 33f7cabbf0 Promote warnings to exceptions in *scanf() functions 2019-12-10 13:01:59 +01:00
Nikita Popov ea4bb58889 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix merge mistake
2019-12-10 09:04:01 +01:00
Nikita Popov 4313659bb9 Fix merge mistake 2019-12-10 09:03:44 +01:00
Nikita Popov c124d202e2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix DCE with FE_FETCH
2019-12-10 09:01:55 +01:00