Commit Graph

542 Commits

Author SHA1 Message Date
Xinchen Hui
f248309b74 Revert "Fixed bug #71053 (Type Hint about DateTime::diff does not match with informed)"
THis is bc break, which will break $date1->diff($date2 , 1), which is
common used

please do not do bc break without a asking

This reverts commit 943b23dcf6.
2015-12-09 12:00:23 +08:00
Reeze Xia
943b23dcf6 Fixed bug #71053 (Type Hint about DateTime::diff does not match with informed) 2015-12-09 11:40:47 +08:00
Dmitry Stogov
ad4fa8f758 Fixed incorrect usage of HASH_OF() macro. Replaced HASH_OF() with more appropriate Z_ARRVAL_P() or Z_OBJPROP_P(). 2015-09-24 22:39:59 +03:00
Dmitry Stogov
a9bbe5c384 Make use of timelib 2015.02's support for external memory managers. 2015-09-22 09:17:50 +01:00
Christoph M. Becker
61591ea636 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70277: new DateTimeZone($foo) is ignoring text after null byte

Resolved conflicts:
	ext/date/php_date.c
2015-08-17 19:28:46 +02:00
Christoph M. Becker
bb057498f7 Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize().
2015-08-17 15:58:37 +02:00
Christoph M. Becker
5e93fe3c57 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #70266 (DateInterval::__construct.interval_spec is not supposed to be optional)
2015-08-14 14:25:19 +02:00
Christoph M. Becker
e66bf11638 Fix #70266 (DateInterval::__construct.interval_spec is not supposed to be optional)
The required_num_args argument of ZEND_BEGIN_ARG_INFO_EX() has to be 1.
2015-08-14 14:19:12 +02:00
Christoph M. Becker
3b874086e2 Fix #70245: strtotime does not emit warning when 2nd parameter is object or string
Caused by a refactoring strtotime() called
zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ...) instead of
zend_parse_parameters().
2015-08-12 19:01:04 +02:00
Stanislav Malyshev
ed709d5aa0 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  update NEWS
  fix test
  update NEWS
  Fix bug #70019 - limit extracted files to given directory
  Do not do convert_to_* on unserialize, it messes up references
  Fix #69793 - limit what we accept when unserializing exception
  Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
  Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
  ignore signatures for packages too
  Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
  Fixed bug #69892
  Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
  Improved fix for Bug #69441
  Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
  Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
  Fix bug #70081: check types for SOAP variables

Conflicts:
	ext/soap/php_http.c
	ext/spl/spl_observer.c
2015-08-04 15:29:13 -07:00
Stanislav Malyshev
69ed3969dd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #70019 - limit extracted files to given directory
  Do not do convert_to_* on unserialize, it messes up references
  Fix #69793 - limit what we accept when unserializing exception
  Fixed bug #70169 (Use After Free Vulnerability in unserialize() with SplDoublyLinkedList)
  Fixed bug #70166 - Use After Free Vulnerability in unserialize() with SPLArrayObject
  ignore signatures for packages too
  Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage
  Fixed bug #69892
  Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes
  Improved fix for Bug #69441
  Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
  Fix bug #70121 (unserialize() could lead to unexpected methods execution / NULL pointer deref)
  Fix bug #70081: check types for SOAP variables

Conflicts:
	.gitignore
	ext/date/php_date.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
2015-08-04 14:10:57 -07:00
Stanislav Malyshev
0e09009753 Do not do convert_to_* on unserialize, it messes up references 2015-08-04 13:59:56 -07:00
Ferenc Kovacs
57247f01f7 removed another E_STRICT(with the approval of Derick), 3 more to go 2015-07-30 13:53:44 +02:00
Dmitry Stogov
4a2e40bb86 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 04:05:24 +03:00
Dmitry Stogov
4bd22cf1c1 Improved zend_string API (Francois Laupretre)
Squashed commit of the following:

commit d96eab8d79
Author: Francois Laupretre <francois@tekwire.net>
Date:   Fri Jun 26 01:23:31 2015 +0200

    Use the new 'ZSTR' macros in the rest of the code.

    Does not change anything to the generated code (thanks to compat macros) but cleaner.

commit b352643910
Author: Francois Laupretre <francois@tekwire.net>
Date:   Thu Jun 25 13:45:06 2015 +0200

    Improve zend_string API

    Add missing methods
2015-06-29 16:44:54 +03:00
Anatol Belski
b148c50f48 Revert fix for bug #55407
See 8e19705a93 and discussion on
github. The suggestion is to target a proper solution in in 7.1.
2015-06-12 17:56:02 +02:00
Dmitry Stogov
1c754f0b71 Get rid of more ZVAL_ZVAL() macros 2015-06-12 13:33:14 +03:00
Dmitry Stogov
8e10e8f921 Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
2015-06-12 12:33:23 +03:00
Xinchen Hui
c6db18f9ab Merge branch 'PHP-5.6' 2015-06-04 21:09:06 +08:00
Xinchen Hui
93b7ba4c9f Merge branch 'PHP-5.5' into PHP-5.6 2015-06-04 21:08:57 +08:00
Xinchen Hui
9a0bdd9069 Fixed invalid read druing apache reload 2015-06-04 21:08:36 +08:00
Derick Rethans
c2ef8a9acc Merge branch 'PHP-5.6' 2015-04-29 00:29:04 +01:00
Derick Rethans
ce9b6e5ee8 Merge branch 'PHP-5.5' into PHP-5.6 2015-04-29 00:28:56 +01:00
Derick Rethans
6a5798d990 Use new structures for tzdb header here as well 2015-04-29 00:28:50 +01:00
Nikita Popov
10756522a7 Fix leak in timezone_open when instantiation fails 2015-04-14 21:44:33 +02:00
Nikita Popov
122d759618 Always throw TypeException on throwing zpp failures
Introduces a ZEND_PARSE_PARAMS_THROW flag for zpp, which forces to
report FAILURE errors using a TypeException instead of a Warning,
like it would happen in strict mode.

Adds a zend_parse_parameters_throw() convenience function, which
invokes zpp with this flag.

Converts all cases I could identify, where we currently have
throwing zpp usage in constructors and replaces them with this API.
Error handling is still replaced to EH_THROW in some cases to handle
other, domain-specific errors in constructors.
2015-04-06 11:27:34 +02:00
Stanislav Malyshev
4975019dd7 Merge branch 'PHP-5.6'
* PHP-5.6:
  Revert "Merge branch 'PHP-5.5' into PHP-5.6"

Conflicts:
	ext/date/php_date.c
	ext/date/tests/DateTime_verify.phpt
2015-04-01 12:50:40 -07:00
Stanislav Malyshev
2d9399af35 Revert "Merge branch 'PHP-5.5' into PHP-5.6"
This reverts commit aa22e80b1a, reversing
changes made to 3e7f47cb03.

Conflicts:
	ext/date/php_date.c
2015-04-01 12:49:25 -07:00
Dmitry Stogov
4796e0242b Merge branch 'InternalClassClean'
* InternalClassClean:
  Fixed test
  Patch improvement:
  Fixed indentation. Fixed comment style. Fixed commented out code.
  Reverted change to function name and added note of why it is different from the class it is actually changing.
  Made UConverter throw an exception if the constructor fails.
  Fixed PDO constructor to not return null.
  Fixed fileinfo behaviour.
  Made Phar throw exception on bad constructor.
  Converted intl extension to use IntlException in constructors.
  Fixed SplFixedArray and tests.
  Fixed ReflectionExtension and ReflectionProperty.
  Fixed ReflectionFunction, ReflectionMethod and ReflectionParameter.
  Fixed PDORow behaviour and message.
2015-04-01 12:11:13 +03:00
Derick Rethans
d252c9f832 Merge branch 'PHP-5.6'
Conflicts:
	ext/date/lib/parse_date.c
	ext/date/php_date.c
2015-03-31 16:36:51 +01:00
Derick Rethans
2d3868984c Merge branch 'PHP-5.5' into PHP-5.6 2015-03-31 16:35:10 +01:00
Derick Rethans
ffbd380e44 Fixed bug #69336 (Issues with "last day of <monthname>"). 2015-03-31 16:35:03 +01:00
Dmitry Stogov
1018f462d8 Patch improvement:
Removed the corresponding core code.
Fixed ext/com_dotnet and ext/date.
Refactored ext/intl changes.
Improved ext/fileinfo and ext/pdo changes.
Fixed tests.
2015-03-30 18:53:38 +03:00
Kalle Sommer Nielsen
75e86b44fc Drop this redundant check, since the minimum version of VC we support is VC11 (_MSC_VER == 1700) in ext/date 2015-03-29 07:14:54 +02:00
Anatol Belski
ec89c85054 cleaning up the version macros 2015-03-23 20:13:59 +01:00
Stanislav Malyshev
081a812b49 Merge branch 'PHP-5.6'
* PHP-5.6:
  oops, forgot TSRMLS_CC

Conflicts:
	ext/date/php_date.c
2015-03-22 21:56:40 -07:00
Stanislav Malyshev
57f835e148 oops, forgot TSRMLS_CC 2015-03-22 21:55:34 -07:00
Stanislav Malyshev
dc6d8f7838 Merge branch 'PHP-5.6'
* PHP-5.6:
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`

Conflicts:
	ext/date/php_date.c
2015-03-22 21:09:00 -07:00
Stanislav Malyshev
cc2fd00942 Merge branch 'pull-request/1145'
* pull-request/1145:
  Putting whitespace back to the way it was.
  Updating the `DateTime_verify` test to include the new method in the reflected method list
  Whoops! String length....
  Adding a new test for the new method
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`
2015-03-22 21:04:41 -07:00
Stanislav Malyshev
aa22e80b1a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Adding a new `createFromImmutable` method to the `DateTime` class to mirror the current `DateTime::createFromMutable()`
2015-03-22 21:03:46 -07:00
Trevor Suarez
c2e22556ba Adding a new createFromImmutable method to the DateTime class to mirror the current DateTime::createFromMutable() 2015-03-22 20:54:25 -07:00
Dmitry Stogov
d146d15003 Optimize zend_string_realloc() add more specialized versions zend_string_extend() and zend_string_truncate() 2015-03-20 02:02:42 +03:00
Dmitry Stogov
8633685675 Use specialized macro for string zval creation 2015-03-12 16:53:51 +03:00
Trevor Suarez
98c6567e71 Putting whitespace back to the way it was. 2015-03-11 09:29:08 -04:00
Trevor Suarez
42660f3d6a Adding a new createFromImmutable method to the
`DateTime` class to mirror the current `DateTime::createFromMutable()`
2015-03-05 01:58:09 -05:00
Reeze Xia
1359dfd18f Revert mktime()/gmmktime()'s arginfo
$is_dst parameter has been removed in commit: 9c5eaac18b
2015-02-28 18:32:18 +08:00
Reeze Xia
968a9f4807 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #69141 Missing arguments in reflection info for some builtin functions
2015-02-28 16:43:41 +08:00
Reeze Xia
1b240ff9e3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #69141 Missing arguments in reflection info for some builtin functions
2015-02-28 16:40:06 +08:00
Reeze Xia
f824f91ac9 Fixed bug #69141 Missing arguments in reflection info for some builtin functions
This include:

- setcookie (missing "httponly")
- setrawcookie (missing "httponly")
- spl_autoload_register (missing 2 optional params)
- mktime  (missing "is_dst")
- gmmktime (missing "is_dst")
2015-02-28 16:37:14 +08:00
Bob Weinand
b22caa81ee Remove useless date warning 2015-02-27 23:27:09 +01:00