1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

2109 Commits

Author SHA1 Message Date
Dmitry Stogov b02b81299c Comparison cleanup:
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
2019-10-07 17:57:49 +03:00
Nikita Popov 5f80eb7842 Fix required number of arguments in stubs
* get_parent_class() argument is optional
* Mark array_filter() $callback as optional
* The $base of gmp_strval() is optional
* DateTime constructor also accepts zero arguments
* hash_update_file() stream context is optional
* xmlwriter_write_dtd_entity() $isparam argument is optional
2019-10-07 16:33:41 +02:00
Nikita Popov 647b1c7fcf Remove most uses of ZEND_PARSE_PARAMETERS_END_EX()
As ZPP now throws, it makes no sense to specify an explicit return
value.
2019-10-07 10:02:18 +02:00
Derick Rethans a0eef7067b Updated to version 2019.3 (2019c) 2019-10-02 23:39:12 +01:00
Nikita Popov 2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov 235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte 0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Gabriel Caruso 5d6e923d46 Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Nikita Popov 962a9cd74e Merge branch 'PHP-7.4' 2019-09-19 11:36:29 +02:00
Nikita Popov 22516b7d8a Merge branch 'PHP-7.3' into PHP-7.4 2019-09-19 11:36:19 +02:00
Nikita Popov f53b8268d6 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-19 11:36:09 +02:00
CJDennis e3255a4f49 Fix typo
`sizeof("data")-1` and `sizeof("date")-1` are both 4, so no change in behaviour
2019-09-19 11:36:00 +02:00
Craig Duncan 06aa2ae993 Update the date class arginfo the new format 2019-08-12 20:57:30 +01:00
Kyle b17957eaac Add missing parameters to __set_state() methods
Closes GH-4526.
2019-08-12 15:20:23 +02:00
Derick Rethans 0835e66372 Updated to version 2019.2 (2019b) 2019-08-11 16:06:00 +01:00
Derick Rethans f465560a0f Updated to version 2019.2 (2019b) 2019-08-11 16:05:59 +01:00
Derick Rethans 7aa1dd3ba1 Updated to version 2019.2 (2019b) 2019-08-11 16:05:58 +01:00
Nikita Popov 3b2f2ce474 Make uninitialized DateTime an Error
This avoids many spurious false return values.
2019-08-09 14:51:25 +02:00
Nikita Popov 33886f710c Generate arginfo from PHP stub files
Signature stubs for internal functions are specified in xyz.stub.php,
from which we generate actual arginfo structures in xyz_arginfo.h.
This file then needs to be included in the implementation appropriately.

Arginfo from stubs can be regenerated using scripts/dev/gen_stub.php.
However, this should also automatically happen when the stub file is
modified.
2019-08-09 14:51:25 +02:00
Matteo Beccati 13980414eb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test when default TZ is not UTC
2019-08-09 09:58:36 +02:00
Matteo Beccati 00dd786ba4 Fix test when default TZ is not UTC 2019-08-09 09:58:10 +02:00
Nikita Popov 527dad600b Merge branch 'PHP-7.4' 2019-08-08 09:56:10 +02:00
Nikita Popov fc17bfaacf Fixed bug #78383 2019-08-08 09:55:52 +02:00
Christoph M. Becker 7556600dfc Fix #65547: Default value for sunrise/sunset zenith still wrong
The value of the zenith angle to calculate sunrise and sunset times is
commonly defined as 90°50', and is "obtained by adding the average
apparent radius of the Sun (16') to the average amount of atmospheric
refraction at the horizon (34')", according to
http://aa.usno.navy.mil/faq/docs/RST_defs.php.

This value is also used for the Sunrise/Sunset Algorithm published in
the Almanac for Computers, 1990, see
https://web.archive.org/web/20161202180207/http://williams.best.vwh.net/sunrise_sunset_algorithm.htm.
2019-07-15 13:52:09 +02:00
Peter Kokot 2ba4fb1263 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove timelib outdated defines
2019-07-14 13:50:43 +02:00
Peter Kokot c72d6da461 Remove timelib outdated defines
- TIMELIB_OMIT_STDINT is not used anymore since
  https://github.com/derickr/timelib/commit/a171f99cf02baf39549ab7209e37565b8b8f6529
- HAVE_GETTIMEOFDAY was defined multiple times in Windows headers
- ext/date/lib/timelib_config.h.win32 does not seem to be used

Closes GH-4400
2019-07-14 13:50:05 +02:00
Nikita Popov bbd12b3d30 Merge branch 'PHP-7.4' 2019-07-10 11:11:30 +02:00
Nikita Popov 9d82a01d01 Clean up DateTimeZone::getLocation() test
And avoid invalid array access.
2019-07-10 11:09:41 +02:00
Derick Rethans 73734eee6c Merge branch 'PHP-7.4' 2019-06-30 15:51:04 +01:00
Derick Rethans a60128c503 Merge branch 'PHP-7.3' into PHP-7.4 2019-06-30 15:50:55 +01:00
Derick Rethans cc3fe3bd30 Fixed tests due to changed timezone data 2019-06-30 15:50:38 +01:00
Derick Rethans aae5907cb7 Update timelib to 2018.02 2019-06-30 15:45:13 +01:00
Peter Kokot 6bfa6bff0b Merge branch 'PHP-7.4'
* PHP-7.4:
  Clean headers checks
2019-06-27 02:45:31 +02:00
Peter Kokot 2079b09854 Clean headers checks
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Joe Watkins 264536877d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  export php_time
2019-06-19 12:40:23 +02:00
Joe Watkins 599b94ff14 export php_time 2019-06-19 12:39:51 +02:00
Joe Watkins 8cc26690b5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 09:01:59 +02:00
Joe Watkins fb95043acf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 09:01:20 +02:00
Joe Watkins 025899e3b5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 08:59:04 +02:00
Joe Watkins 65067dff01 Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044 2019-06-19 08:56:20 +02:00
Nikita Popov 4d90848d68 Don't verify arginfo types for internal functions
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.

Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Nikita Popov d570620917 Merge branch 'PHP-7.4' 2019-06-11 16:21:57 +02:00
Nikita Popov fc65da5c59 Fix 32-bit warnings in timelib
This has already been fixed upstream in
https://github.com/derickr/timelib/commit/4df262e7585b2ad2c6b01a23190974f9aea298ed
so I'm backporting this change.
2019-06-11 16:14:10 +02:00
Dmitry Stogov 457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Craig Duncan facfbf3c9c Update the DatePeriod read/write handlers 2019-05-30 19:16:31 +01:00
Craig Duncan bc87424835 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 19:15:58 +01:00
Craig Duncan a08b3b6d19 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 19:14:04 +01:00
Craig Duncan 370997fb5d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 18:55:55 +01:00
Craig Duncan 8b53c7232e Add a test for bug #65672 2019-05-30 18:55:42 +01:00