Commit Graph

732 Commits

Author SHA1 Message Date
Julien Pauli
048fb4b00f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed and improved tests
  test to function socket_getopt();
  test to function socket_clear_error();;
  test to function socket_shutdown();
  test to function socket_send();
  test to function gethostname ( void );
  test to function DateTimeZone::getLocation();
  test to function stream_get_transports();
  test to function stream_get_wrappers();
  test to function stream_socket_enable_crypto();
  test to function stream_socket_get_name();
  Create stream_socket_recvfrom.phpt
  test to stream function set_file_buffer.phpt();
  test to function PDO_getAvaliableDrivers;
  test to misc. function connection_status();
  test to function connection_aborted();
  test to function memory_get_peak_usage();
2015-12-24 14:08:59 +01:00
marcosptf
891ac59305 test to function DateTimeZone::getLocation(); 2015-12-24 10:56:23 +01:00
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
Derick Rethans
dfc38fd0e4 Merge branch 'PHP-5.6' into PHP-7.0 2015-09-22 08:45:33 +01:00
Derick Rethans
e4f3fb976b Fixed test cases due to changes in rules 2015-09-22 08:42:12 +01:00
Anatol Belski
00eebd7a47 fix dir separator in test 2015-08-28 11:39:26 +02:00
Anatol Belski
5d2294e8b8 fix path separator in test 2015-08-28 11:38:16 +02:00
Christoph M. Becker
07c1b641b5 fixed changed error message in test 2015-08-17 19:33:49 +02: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
Stanislav Malyshev
2eaf28367d fix 32-bit test 2015-08-05 12:04:26 -07:00
Stanislav Malyshev
feeb2fba93 fix merge 2015-08-04 23:51:55 -07:00
Stanislav Malyshev
97047e7665 Merge branch 'PHP-5.6'
* PHP-5.6:
  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:
	Zend/zend_exceptions.c
	ext/date/php_date.c
	ext/openssl/openssl.c
	ext/phar/phar_internal.h
	ext/soap/php_http.c
	ext/spl/spl_array.c
	ext/spl/spl_dllist.c
	ext/spl/spl_observer.c
	ext/standard/tests/serialize/bug69152.phpt
	sapi/cli/tests/005.phpt
2015-08-04 16:14:24 -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
Christoph M. Becker
dbadf447b2 Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed typo in test for bug #66985
2015-07-07 23:39:18 +02:00
Christoph M. Becker
e68b5252a2 fixed typo in test for bug #66985 2015-07-07 23:35:28 +02:00
Aaron Piotrowski
110e0a5a2c Merge branch 'master' into throwable-interface
# Conflicts:
#	Zend/zend_language_scanner.c
#	Zend/zend_language_scanner.l
#	ext/simplexml/tests/SimpleXMLElement_xpath.phpt
2015-06-14 18:53:11 -05: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
Anatol Belski
d28ab1cba3 fix datetime tests with vc14
VC14 RC seems to support more format extensions, however some
difrerences do still persist.
2015-05-24 23:49:42 +02:00
Anatol Belski
9770553437 make the test more reliable 2015-05-24 23:49:40 +02:00
Aaron Piotrowski
e97d5fab35 Update exception names in tests after formatting changes. 2015-05-17 17:31:43 -05:00
Aaron Piotrowski
fb7206e452 Merge branch 'master' into throwable-interface 2015-05-17 16:15:35 -05:00
Nikita Popov
440481fb3e Display TypeExceptions like normal exceptions
We currently don't show the argument at which the error actually
occured in the trace - should probably either add it or don't
display args on incomplete frames altogether, otherwise this'll
probably be confusing.
2015-05-17 19:54:12 +02:00
Nikita Popov
3ae995f03c Tweak uncaught exception message display
This implements a reduced variant of #1226 with just the following
change:

-Fatal error: Uncaught exception 'EngineException' with message 'Call to private method foo::bar() from context ''' in %s:%d
+Fatal error: Uncaught EngineException: Call to private method foo::bar() from context '' in %s:%d

The '' wrapper around messages is very weird if the exception
message itself contains ''. Futhermore having the message wrapped
in '' doesn't work for the "and defined" suffix of
TypeExceptions.
2015-05-17 18:47:06 +02:00
Aaron Piotrowski
64b167d201 Updated tests to reflect exception class changes. 2015-05-16 16:49:14 -05:00
Remi Collet
58e5e006e5 fix test output (32bits) 2015-05-14 10:28:59 +02:00
Remi Collet
ac3ca0280a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Relax tests failing on i386 with new zic
2015-05-05 11:23:13 +02:00
Remi Collet
33e2aa452d Relax tests failing on i386 with new zic 2015-05-05 11:22:29 +02:00
Remi Collet
97fcbf041a relax tests with huge year (new zic) 2015-04-28 12:48:47 +02:00
Remi Collet
c1e84a3bde ignore second value for huge timestamp test (new zic) 2015-04-28 12:48:38 +02:00
Remi Collet
194e64982e relax test for date < INT32_MIN (new zic) 2015-04-28 12:48:30 +02:00
Remi Collet
ba41b340c2 relax bigbang content (new zic) 2015-04-28 12:48:23 +02:00
Remi Collet
c39e777722 Make date transitions tests more flexible
zic in recent glibc (2.20) introduce a new transitionn
so use a range to avoid failure when total number
of transitions is different (243/244)
2015-04-28 12:48:13 +02:00
Remi Collet
1f0a6241b4 Merge branch 'PHP-5.6'
* PHP-5.6:
  relax tests with huge year (new zic)
2015-04-18 10:00:24 +02:00
Remi Collet
1302eb7f72 relax tests with huge year (new zic) 2015-04-18 10:00:15 +02:00
Remi Collet
3bbfb96e1a ignore second value for huge timestamp test (new zic) 2015-04-18 09:37:06 +02:00
Remi Collet
81d01809a2 Merge branch 'PHP-5.6'
* PHP-5.6:
  relax test for date < INT32_MIN (new zic)
2015-04-18 09:28:39 +02:00
Remi Collet
3c81e945a3 relax test for date < INT32_MIN (new zic) 2015-04-18 09:28:29 +02:00
Remi Collet
f877bdac72 Merge branch 'PHP-5.6'
* PHP-5.6:
  relax bigbang content (new zic)
2015-04-18 09:11:48 +02:00
Remi Collet
984f4b09e0 relax bigbang content (new zic) 2015-04-18 09:11:39 +02:00
Remi Collet
971441cfe5 Merge branch 'PHP-5.6'
* PHP-5.6:
  Make date transitions tests more flexible
2015-04-18 07:50:31 +02:00
Remi Collet
cd93b120c3 Make date transitions tests more flexible
zic in recent glibc (2.20) introduce a new transitionn
so use a range to avoid failure when total number
of transitions is different (243/244)
2015-04-18 07:47:47 +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