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

116595 Commits

Author SHA1 Message Date
Nikita Popov 33e39f088a Merge branch 'PHP-7.4'
* PHP-7.4:
  Use unmangled named in property type inheritance error
2019-12-09 08:49:42 +01:00
Nikita Popov 5fcc12f505 Use unmangled named in property type inheritance error 2019-12-09 08:48:33 +01:00
Nikita Popov ded87a9ea0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78904: Don't call any magic for uninitialized typed properties
2019-12-09 08:42:34 +01:00
Nikita Popov 84354c62b3 Fixed bug #78904: Don't call any magic for uninitialized typed properties
We already changed the behavior for __set() in f1848a4. However, it
seems that this is also a problem for all the other property magic,
see bug #78904.

This commit makes the behavior of all the property magic consistent:
Magic will not be triggered for uninitialized typed properties, only
explicitly unset() ones. This brings behavior more in line how
non-typed properties behave and avoids WTF.

Closes GH-4974.
2019-12-09 08:40:53 +01:00
George Peter Banyard 734932ecbb Convert warnings to ValueError 2019-12-08 21:03:14 +01:00
George Peter Banyard 761e8c7707 Remove dead commented code and dead code in-between KALLE_0 ifdefs.
Closes GH-4986
2019-12-08 20:21:40 +01:00
George Peter Banyard eaaf14ea09 Add type error on filename which contain null bytes in bzopen 2019-12-08 20:19:32 +01:00
Jakub Zelenka d98df5b6c6 Merge branch 'PHP-7.4' 2019-12-08 17:58:59 +00:00
Jakub Zelenka ac042f839f Fix bug #78916 (php-fpm 7.4.0 don't send mail via mail()) 2019-12-08 17:57:17 +00:00
George Peter Banyard 2741476838 Add type error on filename which contain null bytes in bzopen 2019-12-08 15:06:59 +01:00
Christoph M. Becker 4daa680512 Drop duplicate definitions of zend_isnan and friends
Following up on commit 1c4ad17[1], we remove these definitions from
zend_config.w32.h, since they would be overridden by those in
zend_portability.h anyway.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=1c4ad17cc1e483201a36b027f20aab1f91d19628>
2019-12-08 14:55:26 +01:00
Christoph M. Becker 2ede8db1b4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78923: Artifacts when convoluting image with transparency
2019-12-07 12:09:16 +01:00
Christoph M. Becker aba070e630 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78923: Artifacts when convoluting image with transparency
2019-12-07 12:08:30 +01:00
willson-chen b5d2cbe027 Fix #78923: Artifacts when convoluting image with transparency
We have to properly initialize `pxl` before using it.

Fix ported from <https://github.com/libgd/libgd/pull/559>.
2019-12-07 12:06:33 +01:00
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
Nikita Popov aed2bf7ab3 Remove unused function 2019-12-06 14:18:52 +01:00
Nikita Popov 0bac785477 Optimize return type checking
Split off the fast-path case and avoid redundant checks.
2019-12-06 14:17:03 +01:00
Dmitry Stogov 990b556761 Use cheaper code for overflow +/-1 2019-12-06 14:04:58 +03:00
Nikita Popov 9554fb3498 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix constant evaluation of && and ||
2019-12-06 11:11:12 +01:00
Nikita Popov 07fc0764d1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix constant evaluation of && and ||
2019-12-06 11:10:31 +01:00
Nikita Popov 249e49092d Fix constant evaluation of && and ||
The "return" in the for loop should have been a break on the switch,
otherwise the result is just ignored... but because it prevents
evaluation of the other operand, it also violates the invariant that
everything has been constant evaluated, resulting in an assertion
failure.

The for loop isn't correct in any case though, because it's not legal
to determine the result based on just the second operand, as the
first one may have a side-effect that cannot be optimized away.
2019-12-06 11:07:57 +01:00
Nikita Popov 8853599514 Try to restore laravel & symfony community jobs
Patch Doctrine to fix the PDOConnection::query() signature.
2019-12-06 07:56:39 +01: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 1c4ad17cc1 Move isinf, isnan, and isfinite to zend_portability.h
Closes GH-4966
2019-12-05 14:27:51 +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 73730eebca Add upgrading notes about removed functionality that were deprecated in PHP 7.4 2019-12-05 13:15:55 +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 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