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

116562 Commits

Author SHA1 Message Date
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
cec7bd58f8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix timeout tests
2019-12-05 11:19:27 +01:00
Nikita Popov
e760d94f4b Fix timeout tests
After taking a more detailed look at our commonly failing timeout
tests... turns out that most of them are useless as written and
don't test what they're supposed to.

This PR has a couple of changes:

* Tests for timeout in while/for/foreach should just have the loop
as an infinite loop. Calling into something like busy_wait means
that we just end up always testing whatever busy_wait does.
* Tests for timeouts in calls need to be based on something like
sleep, otherwise we'd have to introduce a loop, and we'd end up
testing timeout of the looping structure instead. Using sleep only
works on Windows, because that's the only system where sleep counts
towards the timeout. As such, many of those tests are now Windows only.
* Removed some tests where I don't see a good way to test what they're
supposed to test. E.g. how can we test a timeout in eval() specifically?

The shutdown function tests are marked as XFAIL, as we are currently
missing a timeout check in call_user_function. I believe that's a
legitimate issue.

Closes GH-4969.
2019-12-05 11:19:23 +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
21d326adee Merge branch 'reflection-fixes' into HEAD 2019-12-04 19:12:28 -05: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
92d5a2e48c Remove obsolete configure checks for isinf, isnan, and isfinite 2019-12-04 15:17:57 +01: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
039d678fdf Remove now obsolete configure checks for INFINITY and NAN. 2019-12-04 13:50:10 +01:00
George Peter Banyard
67f85573c5 Remove custom implementation for inifinity and NAN as we can now rely on C99
Those ZEND_* constant variant are now identical to their C counterpart, we may considering removing them in the future.
2019-12-04 13:17:20 +01:00
George Peter Banyard
2d0b0d6448 Remove unnecessary C99 checks for maths functions 2019-12-04 12:14:22 +01:00
Nikita Popov
7577e79e69 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix AST printing of nullable builtin types
2019-12-04 11:21:34 +01:00
Nikita Popov
3167e591b5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix AST printing of nullable builtin types
2019-12-04 11:21:28 +01:00
Nikita Popov
fac43d6515 Fix AST printing of nullable builtin types
Fixes oss-fuzz #19109.
2019-12-04 11:20:52 +01:00
Nikita Popov
a6832caac9 Fix incorrect assertion in property type variance check
Only one of the status has to be UNRESOLVED, the other could also
be SUCCESS.

Fixes oss-fuzz #19108 and oss-fuzz #19111.
2019-12-04 11:07: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
Nikita Popov
a298bde9fb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78898
2019-12-04 09:41:51 +01:00
Nikita Popov
6540797f1e Fixed bug #78898 2019-12-04 09:40:48 +01:00
Nikita Popov
7b7115c4c4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add ReflectionMethod::getClosure() change to UPGRADING

[ci skip]
2019-12-04 08:08:40 +01:00
Nikita Popov
9533a815d5 Add ReflectionMethod::getClosure() change to UPGRADING
Fixes bug #78897.

[ci skip]
2019-12-04 08:07:59 +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
f68d2e9c3c Merge branch 'PHP-7.4'
* PHP-7.4:
  Next is 7.3.14
2019-12-03 12:09:47 +01:00
Christoph M. Becker
b16b7ad036 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Next is 7.3.14
2019-12-03 12:07:57 +01:00
Christoph M. Becker
65bbc67063 Next is 7.3.14 2019-12-03 12:04:17 +01:00
Remi Collet
ecffa83556 Merge branch 'PHP-7.4'
* PHP-7.4:
  next is 7.2.27
2019-12-03 11:26:36 +01:00
Remi Collet
322b5de661 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  next is 7.2.27
2019-12-03 11:26:20 +01:00
Remi Collet
3444b90746 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  next is 7.2.27
2019-12-03 11:26:05 +01:00
Remi Collet
d2cfb63f02 next is 7.2.27 2019-12-03 11:25:37 +01:00
Christoph M. Becker
c1a6f2b9cc Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78883: fgets(STDIN) fails on Windows
2019-12-02 16:53:35 +01:00
Christoph M. Becker
996f217aa5 Fix #78883: fgets(STDIN) fails on Windows
We add the `is_seekable` member to `php_stdio_stream_data`, and prefer
that over `is_pipe`, since the latter is simply a misnomer.  We keep
`is_pipe` for now for Windows only, though, because we need special
support for pipes there.  We also fix the misaligned bitfield which
formerly took 33 bit.
2019-12-02 16:52: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