1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
Commit Graph

53618 Commits

Author SHA1 Message Date
Christoph M. Becker
1d69bf187f Fix compiler warning
This cast is already done for all other _aliases, but this one has
apparently been missed so far.
2019-12-06 16:50:28 +01:00
Dmitry Stogov
ebf35cc8e8 Fixed operation with result in CPU register 2019-12-06 17:16:46 +03:00
Dmitry Stogov
990b556761 Use cheaper code for overflow +/-1 2019-12-06 14:04:58 +03:00
Nikita Popov
8f62151ec8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix intermittent error in pdo_mysql___construct_options.phpt
2019-12-06 07:40:01 +01:00
Nikita Popov
8753975418 Fix intermittent error in pdo_mysql___construct_options.phpt
For the love of god, don't write tests based on mt_rand!
2019-12-06 07:39:54 +01:00
Nikita Popov
4a5e17f9af Restore PDOStatement::setFetchMode() signature
I don't think this is worth the BC break, and getting variadic
signature changes compatible across PHP versions is somewhat tricky.
2019-12-06 07:18:11 +01:00
Nikita Popov
e0a8c7a8d0 Remove CV limitation when determining value from type in SCCP
As far as I can determine, this is no longer a problem: We will
not try to remove the defining instructions (this is only done if
the value is known by SCCP itself) and we also only determine
non-refcounted values in this way, so it is not a problem if the
FREE is omitted.
2019-12-05 15:26:16 +01:00
Nikita Popov
9e403d65d8 Add DCE support for ARRAY_KEY_EXISTS 2019-12-05 14:55:22 +01:00
George Peter Banyard
f03d311f1a Capitalize first character of error message. 2019-12-05 14:22:53 +01:00
George Peter Banyard
5fbd49f9ab Convert Errors to ValueErrors
Closes GH-4930
2019-12-05 14:22:54 +01:00
Máté Kocsis
b95da3c75f Remove FILTER_SANITIZE_MAGIC_QUOTES filter 2019-12-05 13:15:55 +01:00
Máté Kocsis
29ef07728e Remove magic quotes legacy 2019-12-05 13:15:54 +01:00
Máté Kocsis
633926021b Remove ezmlm_hash() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
144b41ce88 Remove money_format() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
64468d1e3b Remove convert_cyr_string() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
b63c625260 Remove hebrevc() function 2019-12-05 13:15:54 +01:00
Máté Kocsis
d2868edae0 Capitalize the initial letter of the error message of htmlspecialchars() function 2019-12-05 13:15:53 +01:00
Nikita Popov
a603c06e2e Support "string or array" in zpp
This is one of our more common argument unions. Usage is just
prototyped in a few places, certainly not a full conversion.

I'm removing the str_replace.phpt test, because aparently it was
split up into smaller tests at some point, but the original has
not been removed.

Closes GH-4970.
2019-12-05 12:25:57 +01:00
Nikita Popov
6894cbe042 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli ssl tests
2019-12-05 08:39:16 +01:00
Nikita Popov
6b7cb4a8d7 Fix mysqli ssl tests
First, make sure the tests are skipped if we connect via unix
socket, as we can't use SSL in that case.

Second, use a cipher that is not blacklisted in current MySQL
versions.
2019-12-05 08:38:40 +01:00
Máté Kocsis
5898e8ef3c Promote warning to exception in file_get_contents() function 2019-12-05 08:32:29 +01:00
Máté Kocsis
ad4d6634f4 Promote warnings to exceptions in settype() function 2019-12-05 08:31:43 +01:00
Máté Kocsis
04deb532f0 Promote warning to exception in log() function 2019-12-05 08:30:47 +01:00
Tyson Andre
616ec2dd98 Update/fix remaining opcache zend_func_info.c signatures
See UPGRADING:

> . The GD extension now uses objects as the underlying data structure for
>   images, rather than resources. These objects are completely opaque, i.e.
>   they don't have any methods.

Remove types which are no longer in Reflection due to throwing instead of
emitting warnings.
Remove entries where reference counts are 0 and types are duplicated.

Closes GH-4967.
2019-12-05 07:29:03 +01:00
Nikita Popov
af301be4ef Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78823: add zlib library to mysqlnd
2019-12-05 07:25:26 +01:00
Arjen de Korte
ee4295b4ce Fix bug #78823: add zlib library to mysqlnd
The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided.

Workarounds (either one works)
1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
2) Add "-lz" to list of libraries to be added

In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.
2019-12-05 07:24:52 +01:00
Tyson Andre
96d2b69653 Remove opcache signatures duplicating reflection
None of these are refcounted.
2019-12-04 09:50:24 -05:00
Tyson Andre
1142f0c4a5 Make more opcache signatures consistent with reflection 2019-12-04 09:40:42 -05:00
George Peter Banyard
4845c3f11d Remove configure checks for asinh, acosh, atanh, log1p, hypot 2019-12-04 14:57:11 +01:00
George Peter Banyard
2d0b0d6448 Remove unnecessary C99 checks for maths functions 2019-12-04 12:14:22 +01:00
Nikita Popov
7b34e30b9a Merge branch 'PHP-7.4'
* PHP-7.4:
  Preload: Better reason message for internal parents on windows
2019-12-04 09:53:08 +01:00
Nikita Popov
7cbf31a3c7 Preload: Better reason message for internal parents on windows
Related to bug #78881.
2019-12-04 09:52:40 +01:00
Tyson Andre
0dbc24c3fa Fix other incorrect opcache types
Closes GH-4959.
2019-12-04 07:40:25 +01:00
Tyson Andre
5624d2eb00 Make some opcache types consistent with reflection information
Remove functions such as filter_id() where reference counts and types are
identical to what's in opcache.

Remove null types from zend_func_info.c that aren't in Reflection
(php would throw now)

Fix the Reflection type information for assert_options()

    php > assert_options(ASSERT_CALLBACK, static function() {});
    php > var_export(assert_options(ASSERT_CALLBACK));
    Closure::__set_state(array(
    ))

Closes GH-4958.
2019-12-04 07:31:06 +01:00
Nikita Popov
8dead642fe Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix print_r return types in opcache
2019-12-04 07:17:18 +01:00
Nikita Popov
39b08ba99c Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix print_r return types in opcache
2019-12-04 07:16:56 +01:00
Tyson Andre
c8e9aa854c Fix print_r return types in opcache
https://www.php.net/print_r

> When the return parameter is TRUE, this function will return a string.
> Otherwise, the return value is TRUE.
2019-12-04 07:16:32 +01:00
Christoph M. Becker
8a5601a364 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:39:58 +01:00
Christoph M. Becker
3356dd0575 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:39:35 +01:00
Christoph M. Becker
861fa60814 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78814: strip_tags allows / in tag name => whitelist bypass
2019-12-02 11:38:45 +01:00
Christoph M. Becker
600f1f898f Fix #78814: strip_tags allows / in tag name => whitelist bypass
When normalizing tags to check whether they are contained in the set
of allowable tags, we must not strip slashes, unless they come
immediately after the opening `<`, or immediately before the closing
`>`.
2019-12-02 11:37:25 +01:00
Christoph M. Becker
b07c76059d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78296: is_file fails to detect file
2019-12-02 11:30:23 +01:00
Christoph M. Becker
a9e45bc0fb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78296: is_file fails to detect file
2019-12-02 11:29:58 +01:00
Christoph M. Becker
bb735c9e9e Fix #78296: is_file fails to detect file
If we're constructing extended-length paths (i.e. paths prefixed with
`\\?\`), we have to replace all forward slashes with backward slashes,
because the former are not supported by Windows for extended-length
paths.

The more efficient and likely cleaner alternative solution would be to
cater to this in `php_win32_ioutil_normalize_path_w()` by always
replacing forward slashes, but that might break existing code.  It
might be sensible to change that for `master`, though.
2019-12-02 11:29:10 +01:00
Christoph M. Becker
0dba3a8e43 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:37 +01:00
Christoph M. Becker
4ff242a9a7 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:21:07 +01:00
Christoph M. Becker
3d81c54879 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78833: Integer overflow in pack causes out-of-bound access
2019-12-02 11:19:15 +01:00
Christoph M. Becker
db420cb6a1 Fix #78833: Integer overflow in pack causes out-of-bound access
We check for potential signed integer overflow, and bail out
gracefully, in that case.
2019-12-02 11:18:19 +01:00
Adam Saponara
b35acd30f2 Fix misleading error message in ZendAccelerator.c.
Currently this error emits something like...

`Error Cannot kill process 12345: Success!`

...due to calling `time` before `strerror` which clears `errno`. This
patch adds an error log immediately after both `kill` calls which gives
us better indication of what exactly failed.
2019-12-02 10:06:32 +01:00
Lucas Martín
c0e049656c Fix typo in xmm15 register 2019-12-01 12:28:19 +01:00