1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Commit Graph

1535 Commits

Author SHA1 Message Date
Nikita Popov 16f194c75e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix bug #78323: Code 0 is returned on invalid options
2020-01-27 13:32:51 +01:00
Nikita Popov 1cccbb8ff1 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix bug #78323: Code 0 is returned on invalid options
2020-01-27 13:32:38 +01:00
Ivan Mikheykin fd08f062ae Fix bug #78323: Code 0 is returned on invalid options
Set CLI exit code to 1 when invalid parameters are passed,
and print error to stderr.
2020-01-27 13:32:19 +01:00
Nikita Popov 7ce531f2c2 Make constant() error handling consistent with plain const lookup
This means we get an Error exception and a much better error
message indicating the root cause (e.g. accessing a private class
constant).
2020-01-10 13:39:56 +01:00
Máté Kocsis 7b4a4d2ace Use RETURN_THROWS() after try_convert_to_string() 2020-01-03 17:04:06 +01:00
Máté Kocsis 349a286461 Use RETURN_THROWS() after zend_throw_error() 2020-01-01 16:42:30 +01:00
Máté Kocsis 9099dbd961 Use RETURN_THROWS() after zend_type_error() 2020-01-01 14:23:21 +01:00
Máté Kocsis 31cf9a7ea9 Use RETURN_THROWS() when an exception is thrown
Closes GH-5036
2019-12-30 17:38:10 +01:00
Máté Kocsis e34a1f9289 Convert zend_parse_parameters_none() to fast ZPP in standard lib
Closes GH-5037
2019-12-30 15:28:37 +01:00
Máté Kocsis d59bc80782 Fix smaller issues with stubs
GH-5025
2019-12-20 14:31:07 +01:00
Máté Kocsis d7b2082352 Add stubs for standard library
Closes GH-5017
2019-12-20 12:01:35 +01:00
Tyson Andre 1695d3ed07 Add funcinfo for spl global functions
This assumes that `iterator_*` will now always throw or abort on failure.

Also, move #include _arginfo.h directive to the top of the file - virtually all
other files put it there, and developers may base code on basic_functions.c.

Closes GH-4968
2019-12-11 18:17:04 -05:00
Máté Kocsis 51eefd8079 Add stubs for standard library 2019-12-11 18:50:36 +01:00
Máté Kocsis 9563449d8b Add stubs for another batch of standard functions 2019-12-09 19:47:08 +01:00
Máté Kocsis 29ef07728e Remove magic quotes legacy 2019-12-05 13:15:54 +01:00
Máté Kocsis 633926021b Remove ezmlm_hash() function 2019-12-05 13:15:54 +01:00
Máté Kocsis 144b41ce88 Remove money_format() function 2019-12-05 13:15:54 +01:00
Máté Kocsis 64468d1e3b Remove convert_cyr_string() function 2019-12-05 13:15:54 +01:00
Máté Kocsis b63c625260 Remove hebrevc() function 2019-12-05 13:15:54 +01:00
Fabien Villepinte 2adb1bba17 Fix proto of forward_static_call_array
Closes GH-4928.
2019-11-18 12:46:05 +01:00
Máté Kocsis ab6b412a0b Add stubs for standard lib functions 2019-11-07 17:59:03 +01:00
Máté Kocsis afe4a879c7 Promote register_tick_function() callback validation warning to an exception 2019-11-07 17:56:58 +01:00
Máté Kocsis 662afc80f8 Remove PHP_SLEEP_NON_VOID as it is not useful anymore 2019-11-07 17:56:26 +01:00
Máté Kocsis f19950fea0 Promote some warnings to exceptions in standard lib
Closes GH-4879.
2019-11-01 17:07:51 +01:00
Máté Kocsis ad9ea5abde Add stubs for various standard functions
Closes GH-4851.
2019-10-30 10:34:06 +01:00
Máté Kocsis fee94da127 Add stubs for directory and file functions 2019-10-30 10:10:40 +01:00
Nikita Popov 6719d3e718 Add Z_PARAM_STRING/ARRAY_OR_NULL convenience macros 2019-10-29 13:29:52 +01:00
Nikita Popov e35bdb4912 Add fdiv() function
The fdiv() function is part of the fmod() / intdiv() family. It
implements a floating-point division with IEEE-754 semantics.
That is, division by zero is considered well-defined and does not
trigger any kind of diagnostic. Instead one of INF, -INF or NAN
will be returned, depending on the case.

This is in preparation for throwing DivisionByZeroError from the
standard division operator.
2019-10-11 16:36:11 +02:00
Gabriel Caruso 95181553c8 Add missing zend_parse_parameters_none() checks
Closes GH-4796.
2019-10-08 23:10:18 +02:00
Nikita Popov c9d4696f76 Merge branch 'PHP-7.4' 2019-10-07 16:32:42 +02:00
Nikita Popov f085bddb51 Fix number of required arguments in arginfo
* pack() only requires one argument
* stream_context_set_option() only requires two arguments
* ReflectionMethod::getClosure() accepts no args for static methods
* DOMDocument::createProcessingInstruction() only requires one arg
* DOMImplementation::createDocument() only requires two arguments
* DOMDocument::importNode() only requires one arg
* mysql_get_client_version() doesn't accept any args,
  despite what the docs say...
2019-10-07 16:32:11 +02:00
theodorejb ef9736e062 Convert string function arginfo to PHP stubs 2019-10-07 11:13:16 +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
Nikita Popov 1cde9e8528 Merge branch 'PHP-7.4' 2019-09-30 10:30:20 +02:00
Nikita Popov 1806ce9cb0 Add max_depth option to unserialize()
Add a max_depth option to unserialize and an unserialize_max_depth
ini setting, which can be used to control the depth limit. The
default value is 4096.

This option is intended to prevent stack overflows during the
unserialization of deeply nested structures.

This fixes bug #78549 and addresses oss-fuzz #17581, #17589, #17664,
and #17788.
2019-09-30 10:28:24 +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 96840a280f Add debugging code to usleep()
To see if intermittent CI failures are caused by a signal interrupt.
2019-09-18 10:13:35 +02:00
Burak Çakırel d2210dc2ea Add assert arginfo stubs
Closes GH-4619.
2019-08-26 15:41:31 +02:00
Theodore Brown d5f42d68c8 Convert remaining array function arginfo to PHP stubs 2019-08-26 12:53:00 +02:00
Olumide Samson b9c961e160 Add some header and html function stub 2019-08-25 15:27:58 +02:00
inem0o baeb10d736 Add sha1 arginfo stubs 2019-08-19 12:35:53 +02:00
inem0o 8150c65ae4 Add pageinfo arginfo stubs 2019-08-19 11:29:22 +02:00
inem0o b7c4d8e846 Add metaphone arginfo stubs 2019-08-19 11:18:44 +02:00
inem0o ff7900f551 Add md5 arginfo stubs 2019-08-19 09:41:46 +02:00
inem0o f795bdfd30 Add lcg arginfo stubs 2019-08-16 12:56:07 +02:00
inem0o f1eca42825 Add ftok arginfo stubs 2019-08-16 12:53:11 +02:00
Theodore Brown e2b0fb946b Add hrtime arginfo stubs 2019-08-14 16:46:10 +02:00
jason-liew ffffaf12cf add some stubs for array func in basic_functions 2019-08-14 15:27:58 +02:00
Nikita Popov 8c927442b4 Merge branch 'PHP-7.4' 2019-08-13 14:54:57 +02:00
Islam Israfilov 1dc88ff67e Add inet_ntop and inet_pton stubs 2019-08-13 14:52:14 +02:00