Nikita Popov
427cc4f496
Diagnose missing format specifier at end of string
2020-04-22 13:05:16 +02:00
Nikita Popov
f6455c5048
Emit diagnostic on unknown printf specifier
...
Removing lots of bogus tests...
Closes GH-5435.
2020-04-22 12:42:24 +02:00
Nikita Popov
6ef0d470bf
Remove some redundant sprintf variation tests
...
Add a single test that feeds different data types into the relevant
format specifiers, and remove tests that test full matrices of
different types with different formats and modifiers. We're just
interested in how the types are going to be interpreted, the behavior
of all the modifiers is going to stay the same.
2020-04-22 11:09:46 +02:00
Nikita Popov
30a5f3da99
printf: Report error if missing padding character
2020-04-22 10:14:30 +02:00
Nikita Popov
2aa661887f
Remove redundant vfprintf/vsprintf variation tests
...
These duplicate vprintf() variation tests. While it's useful to
test the vfprintf() and vsprintf() variants of the function, the
main formatting machinery is shared between them, and it makes
little sense to repeat the full set of format tests for all of
them.
2020-04-21 18:26:59 +02:00
Nikita Popov
40ceafc7f2
Fix number of required parameters in printf
...
If n$ references are involved, the maximum argnum referenced may
not the one at the end. Store it explicitly.
2020-04-21 17:01:47 +02:00
Christoph M. Becker
3d1b730c11
Fix #71417 : fread() does not report zlib.inflate errors
...
If the zlib.inflate filter fails to decompress the stream, we raise a
notice instead of failing silently.
2020-04-20 16:49:08 +02:00
Máté Kocsis
6111d64cda
Improve a last couple of argument error messages
...
Closes GH-5404
2020-04-20 13:09:00 +02:00
Nikita Popov
283d37ad8f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix file name clash in touch_variation1.phpt
2020-04-20 12:07:59 +02:00
Nikita Popov
5c40491567
Fix file name clash in touch_variation1.phpt
2020-04-20 12:07:46 +02:00
Nikita Popov
3d5db42ca5
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix bug #67369 ArrayObject serializatino drops the iterator class
2020-04-20 11:56:35 +02:00
Alex Dowad
0d11d37357
Fix bug #67369 ArrayObject serializatino drops the iterator class
...
When ArrayObject is round-tripped through serialize() and unserialize(),
it forgets any iterator class name which was set using ::setIteratorClass().
Fix that.
2020-04-20 11:55:18 +02:00
Máté Kocsis
7a260a4a1c
Revert unintended test change
2020-04-16 18:56:23 +02:00
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
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
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
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
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
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
d6a19bae51
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
2020-03-25 10:51:32 +01:00
Nikita Popov
2b3b7f5cd9
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
2020-03-25 10:51:23 +01:00
Christian Schneider
c0840fec9c
Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
...
Closes GH-5292.
2020-03-25 10:50:35 +01:00
Tyson Andre
dcca0391e2
Skip ftruncate_bug76422 if disk_free_space() <= 4GB
...
Followup to https://github.com/php/php-src/pull/5043
In the middle of running this test with TESTS=-j9,
run-tests.php stopped the test suite because the partition started
with 3.5GB of free disk space and new test files couldn't be created.
Reclaiming the disk space of that file also took a while.
Closes GH-5283
2020-03-21 12:01:28 -04:00
Christoph M. Becker
825384c478
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix potential test conflict
2020-03-20 08:57:43 +01:00
Christoph M. Becker
9e6d80dc8f
Fix potential test conflict
...
Cf. <https://ci.appveyor.com/project/php/php-src/builds/31564684/job/k9u3xv860fao3n2e#L5578 >
2020-03-20 08:56:40 +01:00
Máté Kocsis
bb6f374048
Improve argument error messages in ext/standard
...
Closes GH-5198
2020-03-18 19:56:10 +01:00
Nikita Popov
e957a8cd92
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Make bug52820.phpt more robust
Explicitly start mysql
Use "set -e" in some pipeline steps
2020-03-18 11:46:37 +01:00
Nikita Popov
ba6834fa57
Make bug52820.phpt more robust
...
Use a more robust error condition...
2020-03-18 11:46:27 +01:00
Philipp Tanlak
1668ad7cb1
Add str_contains() function
...
RFC: https://wiki.php.net/rfc/str_contains
Closes GH-5179.
2020-03-16 11:05:26 +01:00
Nikita Popov
e8678fcb42
Fixed bug #75902
...
Don't special-case nested arrays/objects in str_replace(), instead
perform a string cast on them as well. For arrays, this will always
result in the usual conversion warning.
This behavior is consistent with preg_replace(). If we didn't want
to cast the array to string here, we should instead perform the
replacement recursively. Silently copying it is just confusing.
2020-03-10 16:49:17 +01:00
Christoph M. Becker
b31f73b1c8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Enclose INI values containing {TMP} in quotes
2020-03-09 22:53:23 +01:00
Christoph M. Becker
fea2994ff8
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00
Christoph M. Becker
d5e206620b
Enclose INI values containing {TMP} in quotes
...
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
2020-03-09 22:49:08 +01:00
Christoph M. Becker
22ec3bcebd
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix intermittent test failures of windows_mb_path tests
2020-03-04 12:16:13 +01:00
Christoph M. Becker
04c9c4ae7d
Fix intermittent test failures of windows_mb_path tests
...
Some of these tests create, use and later remove the same folder, so if
these are run in parallel, they may fail due to race conditions[1]. As
quick fix we add appropriate CONFLICTS clauses to prevent parallel
execution of the respective test groups.
[1] <https://ci.appveyor.com/project/php/php-src/builds/31213037/job/48rp13i0frf5t9hl#L5480 >
2020-03-04 12:15:10 +01:00