Commit Graph

116442 Commits

Author SHA1 Message Date
Christoph M. Becker
64685782e4 Allow to call XMLReader::open() and ::XML() statically
The implementation of `XMLReader::open()` and `XMLReader::XML()` still
supports calling the methods statically and non-statically.  However,
as of PHP 8.0.0, calling these methods statically is not allowed,
because they are not declared as static methods.  Since we consider it
to be cleaner to call these methods statically, but had deprecated to
call them statically, we properly support both variants.

We implement support for static and non-static calls by overloading, so
that non-static calls have access to the `$this` pointer.
2019-10-29 15:58:32 +01:00
Nikita Popov
4963701aa4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #78689
2019-10-29 15:08:03 +01:00
Nikita Popov
4f1d5380e2 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78689
2019-10-29 15:07:28 +01:00
Nikita Popov
33dd25d21c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78689
2019-10-29 15:06:52 +01:00
Nikita Popov
f9895b4bf5 Fixed bug #78689 2019-10-29 15:06:16 +01:00
Nikita Popov
817fbe8186 Remove some RETURN_FALSE on exception 2019-10-29 13:36:03 +01:00
Nikita Popov
6719d3e718 Add Z_PARAM_STRING/ARRAY_OR_NULL convenience macros 2019-10-29 13:29:52 +01:00
Nikita Popov
63a20cb400 Don't accept objects for options in password_hash()
This was likely a mixup of zpp modifiers in the original implementation.
Per the RFC only arrays should be accepted here.
2019-10-29 13:20:22 +01:00
Nikita Popov
c43179fb6b Promote base_convert "invalid base" errors to ValueError 2019-10-29 13:12:37 +01:00
Nikita Popov
26327bcd3b Throw "Unsupported operand types" error when using ** on arrays 2019-10-29 13:05:02 +01:00
Nikita Popov
8f20b9969f Expect number argument in round() 2019-10-29 12:50:29 +01:00
Craig Duncan
1d631c18de Convert phpdbg arginfo to php stubs
Closes GH-4867.
2019-10-29 11:39:58 +01:00
Nikita Popov
1c9cbc911d Small phpdbg cleanups
Add a zpp_none() call, convert E_ERROR to ValueError.
2019-10-29 11:39:02 +01:00
Nikita Popov
504f7ffdd6 Small ext/dom cleanups 2019-10-29 11:16:23 +01:00
Christoph M. Becker
312ecc69d5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip test case on non Windows platforms
2019-10-29 10:07:22 +01:00
Christoph M. Becker
22523958f4 Skip test case on non Windows platforms 2019-10-29 10:05:31 +01:00
Nikita Popov
39897eb80b Try to fix asan warning in scalar_constant_defaults.phpt
Doing the SAVE_VALID_OPLINE right before the call, because we
still need r0 before that.
2019-10-29 10:01:35 +01:00
Derick Rethans
726989433a Merge branch 'PHP-7.4' 2019-10-29 09:00:45 +00:00
Christoph M. Becker
657f7e898d Merge branch 'PHP-7.4'
* PHP-7.4:
  Skip test case on non Windows platforms
2019-10-29 09:57:27 +01:00
Christoph M. Becker
c5e1a0454f Skip test case on non Windows platforms 2019-10-29 09:53:44 +01:00
Nikita Popov
778a9c05b6 Try to fix 32-bit fprintf test 2019-10-29 09:52:46 +01:00
Derick Rethans
365a45210b Update NEWS for 7.4.0RC6 2019-10-29 08:50:32 +00:00
Derick Rethans
6d8168f1d1 Update NEWS for PHP 7.4.0RC5 2019-10-29 08:49:13 +00:00
Christoph M. Becker
3dbb90b07e Fix test cases for master 2019-10-29 09:35:16 +01:00
Christoph M. Becker
6c078d8bd5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Implement #78270: Support __vectorcall convention with FFI
2019-10-29 08:58:17 +01:00
Christoph M. Becker
bedbecf56d Implement #78270: Support __vectorcall convention with FFI
To work around the limitation of the current rudimentary vectorcall
support in our patched libffi, we forbid yet unsupported declarations,
i.e. float/double parameters at certain positions (SIMD vector types
and HVA types are not supported anyway).
2019-10-29 08:57:43 +01:00
Stanislav Malyshev
39bf35ca87 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:57 -07:00
Stanislav Malyshev
53b1d76144 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:50 -07:00
Stanislav Malyshev
8c2b3b0568 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:44 -07:00
Stanislav Malyshev
2bdb13a1f7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix libmagic buffer overflow issue (CVE-2019-18218)
  bump version
  set versions for release
2019-10-28 20:47:30 -07:00
Christoph M. Becker
c2f56d0546 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add support for Interbase 1 dialect
2019-10-28 16:41:16 +01:00
Simonov Denis
3fb42a382c Add support for Interbase 1 dialect 2019-10-28 16:40:51 +01:00
Christoph M. Becker
b897d19552 Add missing zend_parse_parameters_none()
We fix the trivial cases; some others need further discussion, see
<https://news-web.php.net/php.internals/107723>.
2019-10-28 16:18:15 +01:00
Nikita Popov
87fefd165a Remove ability to unbind $this of closures if used
This was deprecated in PHP 7.4, removing it for PHP 8.0.
2019-10-28 13:24:07 +01:00
Fabien Villepinte
26579db403 Define IS_WINDOWS in the test runner
Avoid code duplication

Closes GH-4866.
2019-10-28 13:14:50 +01:00
Christoph M. Becker
f9a98f6dbd Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:44 +01:00
Christoph M. Becker
9e4c5db733 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:09:24 +01:00
Christoph M. Becker
736cd93ef5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78751: Serialising DatePeriod converts DateTimeImmutable
2019-10-28 13:08:34 +01:00
Christoph M. Becker
89c327f884 Fix #78751: Serialising DatePeriod converts DateTimeImmutable
When getting the properties of a DatePeriod instance we have to retain
the proper classes, and when restoring a DatePeriod instance we have to
cater to DateTimeImmutable instances as well.
2019-10-28 13:07:28 +01:00
Christoph M. Becker
84f2a984d4 Elevate warnings to Error Exceptions in ext/bcmath
`bcdiv()` and `bcmod()` throw DivisionByZeroError if the divisor is 0,
which matches the behavior of the `/` and `%` operators, and `bcsqrt()`
throws ValueError for negative operands.
2019-10-28 12:22:31 +01:00
kharhamel
82dc9a31c3 Convert warnings to Errors in sprintf() functions
Closes GH-4837.
2019-10-28 11:58:59 +01:00
Tyson Andre
9d48bf5152 Fix miscellaneous typos in docs and error messages
Closes GH-4863.
2019-10-28 11:44:08 +01:00
Nikita Popov
742aaaa150 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove redundant variable rv and optimize code
2019-10-28 11:42:57 +01:00
ZiMuyang
99c84cd92a Remove redundant variable rv and optimize code
Closes GH-4864.
2019-10-28 11:42:45 +01:00
Tyson Andre
e7ff590d0d Optimize array_slice for packed arrays with large offsets
If the offset is 100000, and there are no gaps in the packed/unpacked array,
then advance the pointer once by 100000,
instead of looping and skipping 100000 times.

Add a new test of array_slice handling unset offsets.

Closes GH-4860.
2019-10-28 11:30:59 +01:00
Nikita Popov
9f98fddb7b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78752
2019-10-28 10:28:24 +01:00
Nikita Popov
1ddda13d84 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78752
2019-10-28 10:28:14 +01:00
Nikita Popov
b61b60d15b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78752
2019-10-28 10:28:04 +01:00
Nikita Popov
16c4910876 Fix bug #78752
NULL out the execute_data before destroying it, otherwise GC may
trigger while the execute_data is partially destroyed, resulting
in double-frees.

The handling of call stack unfreezing is a bit awkward because it's
a ZEND_API function, so we can't change the signature.
2019-10-28 10:27:32 +01:00
Stanislav Malyshev
469820048d Fix libmagic buffer overflow issue (CVE-2019-18218)
Ported from 46a8443f76
2019-10-27 16:30:38 -07:00