Commit graph

868 commits

Author SHA1 Message Date
Joe Watkins
3e267ca91b
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76131 some arginfo params are different from the documentation
2018-03-27 21:58:24 +02:00
Gabriel Caruso
63934ea71e
Fix #76131 some arginfo params are different from the documentation 2018-03-27 21:56:46 +02:00
Gabriel Caruso
caa32517ba Use ZEND_ARG_ARRAY_INFO in DateTime*::__set_state 2018-03-23 18:58:42 +01:00
Christoph M. Becker
ef255c9f0f Revert "[ci skip] Add missing return types to protos"
This reverts commit a2c7c46d5e.

Since apparently there have been some mistakes in this commit, and it's
not clear yet how to solve them, we're reverting for now.
2018-02-27 17:40:03 +01:00
Gabriel Caruso
a2c7c46d5e [ci skip] Add missing return types to protos 2018-02-24 11:45:17 +01:00
Gabriel Caruso
1314f0fb3a Use int instead of long in protos 2018-02-23 11:06:20 +01:00
Anatol Belski
f63393aee8 Fix possible memory leak 2018-02-20 08:23:25 +01:00
Nikita Popov
ede663f381 Convert iterator by reference errors to exceptions
I'm using RuntimeException in SPL, because other SPL classes that
throw this error used it. Error is used for everything else, because
that's what core does.
2018-02-19 21:58:56 +01:00
Anatol Belski
f44f9d6206 Remove always true condition 2018-02-17 13:02:50 +01:00
Anatol Belski
e72e537d1b Reduce var scope 2018-02-17 13:02:49 +01:00
Remi Collet
636905e8b6 Merge branch 'PHP-7.2'
* PHP-7.2:
  factorization of duplicated code
2018-02-14 13:16:55 +01:00
Remi Collet
17164bcf8d factorization of duplicated code 2018-02-14 13:15:09 +01:00
Remi Collet
528bc00d84 Fix timezone var_dump from 51f2a5803f 2018-02-14 08:59:24 +01:00
CHU Zhaowei
51f2a5803f
Fixed bug #68406 calling var_dump on a DateTimeZone object modifies it 2018-02-12 09:20:14 +01:00
CHU Zhaowei
766271a105
fix #68406 2018-02-12 09:19:53 +01:00
Joe
8c1147b089
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #68406 calling var_dump on a DateTimeZone object modifies it
2018-02-12 09:19:11 +01:00
jhdxr
070211b3e3
Fixed bug #68406 calling var_dump on a DateTimeZone object modifies it 2018-02-12 09:17:21 +01:00
Christoph M. Becker
c718970e9e Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix #75857: Timezone gets truncated when formatted
2018-02-11 12:56:39 +01:00
Christoph M. Becker
7554fd9101 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75857: Timezone gets truncated when formatted
2018-02-11 12:49:41 +01:00
Gabriel Caruso
f706937120 Fix #75857: Timezone gets truncated when formatted
Use sizeof buffer instead of hard-coded lenghts
2018-02-11 03:14:41 +01:00
Nikita Popov
f16710961b Merge branch 'PHP-7.2' 2018-02-10 19:31:09 +01:00
Nikita Popov
ee3f3a9d75 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-10 19:30:57 +01:00
Pedro Lacerda
fddd7e38bd Fixed bug #75928 2018-02-10 19:29:47 +01:00
Gabriel Caruso
bdb8b4fb2b Fix DateTime*::__set_state arginfo
This is a minor BC break, because classes inheriting from DateTime and
overriding __set_state() now have to specify the additional parameter
as well. However, adding the additional parameter also continues to
work on previous versions of PHP, so this change is acceptable for
master.
2018-02-03 16:12:46 +01:00
David Carlier
6e94f943c1 Avoid abs() type mismatch warnings
timelib_time z field was mistakenly promoted to 64 bits types in
one place. Otherwise silence warning with explicit cast down to int.
2018-01-06 21:51:31 +01:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov
1db8402208 Move zend_object_iterator_funcs structures into read-only data segment 2017-12-14 14:21:22 +03:00
Dmitry Stogov
6a9d2b2190 Cleanup type conversion 2017-12-07 19:24:55 +03:00
Nikita Popov
dcdd4abdb2 Make sure properties are initialized before cloning
Now that they are not memset, they need to be explicitly intialized,
as zend_objects_clone_members() destroys the old property values
first.
2017-11-25 22:51:37 +01:00
Nikita Popov
b72b1a4e4d Add zend_object_alloc() API
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.

Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
2017-11-25 17:12:37 +01:00
Anatol Belski
c57a2dccae Use appropriate macro 2017-11-17 23:32:37 +01:00
Anatol Belski
95bfbeeea8 Remove useless condition 2017-11-17 23:32:03 +01:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Derick Rethans
0651886ab9 Merge branch 'PHP-7.2' 2017-11-07 14:52:26 +00:00
Derick Rethans
466a34d67c Revert "date module, replacing abs call with the llabs's like one due to bigger type"
This reverts commit c189845951.
2017-11-07 14:52:12 +00:00
Joe Watkins
c0b73c82af
Merge branch 'PHP-7.2'
* PHP-7.2:
  date module, replacing abs call with the llabs's like one due to bigger type
2017-11-07 05:27:38 +00:00
David Carlier
c189845951
date module, replacing abs call with the llabs's like one due to bigger type 2017-11-07 05:27:27 +00:00
Sammy Kaye Powers
98d6d1189c
Remove decade-old commented-out code 2017-10-31 14:46:16 +00:00
Anatol Belski
65f610bd9f Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix array access on undeclared properties in DateInterval
2017-10-09 15:40:00 +02:00
Anatol Belski
611d117b24 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix array access on undeclared properties in DateInterval
2017-10-09 15:38:37 +02:00
Anatol Belski
d8881f4eb4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix array access on undeclared properties in DateInterval
2017-10-09 15:38:21 +02:00
Anatol Belski
f48abfa902 Fix array access on undeclared properties in DateInterval 2017-10-09 15:35:38 +02:00
Joe Watkins
a4da53a654
Merge branch 'PHP-7.2'
* PHP-7.2:
  fix bug #75222 DateInterval microseconds property always 0
2017-09-27 06:24:46 +01:00
jhdxr
7deb561f75
fix bug #75222 DateInterval microseconds property always 0 2017-09-27 06:23:42 +01:00
Xinchen Hui
ff6f41c94e Narrow typeinfos down for zend_parse_paramenters_none 2017-09-12 11:25:21 +08:00