Nikita Popov
5e8be710ca
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix directory clash in tempnam_variation4 test
2020-04-15 11:25:18 +02:00
Nikita Popov
0a2fd0db3c
Fix directory clash in tempnam_variation4 test
2020-04-15 11:25:06 +02:00
Nikita Popov
7643cf1996
More precise ifunc resolver return type
...
Fixes -Wattribute-alias warning.
2020-04-15 11:01:12 +02:00
Nikita Popov
4a935bc2c9
Always use __invoke callable name for objects
...
The callable name is provided also if it's not callable, in which
case it's basically "what it would be if it were callable", which
is ClassName::__invoke. The current behavior of casting the object
to string makes very little sense as this will just throw an
exception for most objects.
2020-04-14 17:02:47 +02:00
Nikita Popov
e9bdbce53f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't leak peername if accept fails
2020-04-14 16:08:43 +02:00
Nikita Popov
912e490196
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Don't leak peername if accept fails
2020-04-14 16:08:07 +02:00
Nikita Popov
b56fb9019e
Don't leak peername if accept fails
...
Even if the accept fails, the peername may be populated.
2020-04-14 16:07:39 +02:00
Máté Kocsis
1f48feebb9
Improve some TypeError and ValueError messages
...
Closes GH-5377
2020-04-14 14:38:45 +02:00
Christoph M. Becker
6e21932521
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test cases
2020-04-14 14:01:00 +02:00
Christoph M. Becker
2a46f3ee91
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix test cases
2020-04-14 13:59:39 +02:00
Christoph M. Becker
a1b46fc152
Fix test cases
2020-04-14 13:58:48 +02:00
Nikita Popov
56d30bb35a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #79468
2020-04-14 12:02:22 +02:00
Nikita Popov
ef56b2c977
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #79468
2020-04-14 12:01:51 +02:00
dinosaur
95eaccd0bb
Fixed bug #79468
...
Close the stream filter resources when removing them from the stream.
2020-04-14 11:59:51 +02:00
Máté Kocsis
c5fb4f0794
Generate function entries from stubs for a couple of extensions
...
Migrates ext/standard, ext/tidy, ext/tokenizer,
ext/xml, ext/xml_reader, and ext/xml_writer. Closes GH-5381.
2020-04-14 11:49:02 +02:00
Stanislav Malyshev
d3fbdf0048
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix bug #79465 - use unsigneds as indexes.
Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:23 -07:00
Stanislav Malyshev
864d69bef7
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix bug #79465 - use unsigneds as indexes.
Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:15 -07:00
Stanislav Malyshev
d539e61c30
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix bug #79465 - use unsigneds as indexes.
Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:08 -07:00
Stanislav Malyshev
9d6bf8221b
Fix bug #79465 - use unsigneds as indexes.
2020-04-13 21:08:37 -07:00
Stanislav Malyshev
14fcc81394
Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:08:30 -07:00
Máté Kocsis
beff93f60d
Fix the default parameter values of stream_socket_client()
...
$timeout and $flags were mixed up
2020-04-10 17:17:12 +02:00
Nikita Popov
fcc6da3e42
Mark $time argument of touch() as UNKNOWN as well
...
For some reason I thought that passing 0 is same as current time,
but that's not the case.
2020-04-09 16:54:42 +02:00
Nikita Popov
636c827aa2
Mark fgets() argument as UNKNOWN
...
If no value is passed, this reads as much as necessary, not 1024
bytes.
2020-04-09 16:22:34 +02:00
Christoph M. Becker
62e8dcbc48
Change parameter default to always available value
...
`SIGTERM` is only defined in ext/pcntl, and as such never available on
Windows. Moving the constant to ext/standard does not make much sense,
because that parameter is actually unused on Windows. Therefore, we
use the magic number `15` instead, what is also done in the PHP manual.
2020-04-09 16:15:47 +02:00
Nikita Popov
87ba975e31
Make touch() $atime parameter UNKNOWN
...
The actual default here is $time, not 0.
2020-04-09 16:11:17 +02:00
Nikita Popov
258c4dfdb2
Mark rand/mt_rand args as UNKNOWN
...
The second argument should be mt_getrandmax(), not PHP_INT_MAX.
Additionally this function only accepts either zero or two arguments,
so err on the side of being conservative and mark both UNKNOWN.
2020-04-09 16:10:56 +02:00
Nikita Popov
1dcb559664
Mark array_walk $userdata arg as UNKNOWN
...
It makes a difference whether this arg is not passed or is null.
2020-04-09 16:10:39 +02:00
Nikita Popov
b3f3a80f9c
Make stream_socket_enable_crypto() session stream nullable
2020-04-09 16:10:33 +02:00
Nikita Popov
217dfc0832
Accept null context in stream_socket_(client|server)
2020-04-09 16:10:27 +02:00
Nikita Popov
2d1bf6970d
Add Z_PARAM_RESOURCE_OR_NULL()
...
As a more explicit alternative to Z_PARAM_RESOURCE_EX(, 1, 0).
2020-04-09 15:39:11 +02:00
Christoph M. Becker
e6458d67cf
Fix #79462 : method_exists and property_exists incoherent behavior
...
Both functions are closely related, so should behave the same for wrong
input types, i.e. both should throw a TypeError.
2020-04-09 11:38:47 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
2020-04-08 18:37:51 +02:00
Máté Kocsis
50765075db
Improve some ValueError messages
...
Closes GH-5340
2020-04-06 10:41:01 +02:00
Nikita Popov
2bcc4ab8f4
Verify that all stubs have a return type
2020-04-03 17:59:30 +02:00
Nikita Popov
2bfcd8825c
Remove now unnecessary PHP_FUNCTION() declarations
2020-04-03 15:41:41 +02:00
Nikita Popov
51bc6233b2
Generate function entries from stubs
...
If @generate-function-entries is specified in the stub file,
also generate function entries for the extension.
Currently limited to free functions only.
2020-04-03 15:41:41 +02:00
Máté Kocsis
305b17e85f
Do not include the same stub multiple times
...
Closes GH-5322
2020-04-03 14:23:54 +02:00
Christoph M. Becker
6983ae751c
Fix #47983 : mixed LF and CRLF line endings in mail()
...
Email headers are supposed to be separated with CRLF. Period.
2020-04-02 14:51:14 +02:00
Christoph M. Becker
737f7dd8f6
Prevent imap mail tests from borking instead of skipping
...
As of commit e49593a[1], run-tests.php is rather picky regarding the
output of SKIPIF sections, so we have to suppress warnings for failing
imap_open().
[1] <http://git.php.net/?p=php-src.git;a=commit;h=e49593a7c3159a5673ce74b4e5133f1264dc313f >
2020-04-02 12:51:22 +02:00
Nikita Popov
cdaf35033d
Improve "unsupported operands" error
...
By mentioning the operand types. We can do that now, as the
original operand types now remain available.
Closes GH-5330.
2020-04-01 11:26:43 +02:00
Máté Kocsis
b6229fbca2
Display nullability in type error messages for internal functions
...
Closes GH-5327
2020-03-31 16:55:36 +02:00
George Peter Banyard
55a3e5b99e
Promote some warnings to Errors in Zend basic functions
...
Closes GH-5325
2020-03-31 16:32:58 +02:00
Máté Kocsis
36935e42ea
Improve undefined variable error messages
...
Closes GH-5312
2020-03-31 13:02:32 +02:00
George Peter Banyard
457380cae7
Drop wchar header check as always defined since C95
2020-03-31 00:14:56 +02:00
George Peter Banyard
aa47543cb4
Fix format for tm member objects as they are stored as integers
...
Closes GH-5326
2020-03-30 17:09:49 +02:00
Nikita Popov
f9e4c71506
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't check directory nlink in stat tests
2020-03-30 10:54:34 +02:00
Nikita Popov
b9b49cfb7b
Don't check directory nlink in stat tests
...
It seems like on many filesystems nlink for directories is the
number of subdirectories (plus two, due to . and ..). However,
this is not a POSIX requirement, and some filesystems don't
implement it this way. This seems to be the case for whatever is
used on the Travis AArch64 builders now.
2020-03-30 10:54:03 +02:00
Nikita Popov
97cb81ead5
Remove HAVE_REALPATH checks
...
We do not actually use realpath(), but a custom implementation.
Make sure the realpath() function is always available.
Closes GH-5290.
2020-03-26 11:46:00 +01:00
Christoph M. Becker
556573b290
Fix php_exec() output length
...
If trailing whitespace is stripped, we have to propagate the change of
`bufl` back to php_exec().
2020-03-26 01:09:50 +01:00
Nikita Popov
a524785d5d
Clean up php_exec() implementation a bit
2020-03-25 11:11:30 +01:00