1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00
Commit Graph

5075 Commits

Author SHA1 Message Date
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
Nicolas Grekas
9e775db025 Define Stringable with __toString():string method 2020-03-02 15:25:32 +01:00
Máté Kocsis
960318ed95 Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Nikita Popov
a939805641 Use serialize_precision for var_dump()
var_dump() is debugging functionality, so it should print
floating-point numbers accurately. We do this by switching
to serialize_precision, which (by default) will print with
as much precision as necessary to preserve the exact value
of the float.

This also affects debug_zval_dump().

Closes GH-5172.
2020-02-25 09:51:32 +01:00
Nikita Popov
c3aa9132d6 Fix argon2 test if provided by sodium 2020-02-24 21:34:37 +01:00
Nikita Popov
f69bad872a Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't treat any WS as start of header
2020-02-24 10:20:49 +01:00
Nikita Popov
c5128fb7fc Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Don't treat any WS as start of header
2020-02-24 10:20:43 +01:00
Nikita Popov
56cdbe63c2 Don't treat any WS as start of header
Check that the header occurs after \n, not other whitespace
characters.
2020-02-24 10:20:33 +01:00
Nikita Popov
ce2abdd42e Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixes #79265: Improper injection of Host header when using fopen for http requests
2020-02-24 09:51:55 +01:00
Nikita Popov
e855b286c8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixes #79265: Improper injection of Host header when using fopen for http requests
2020-02-24 09:51:36 +01:00
Miguel Xavier Penha Neto
d0d60503b5 Fixes #79265: Improper injection of Host header when using fopen for http requests
Check all occurrences of the string "host:" (and other headers),
not just the first one.
2020-02-24 09:50:32 +01:00
Christoph M. Becker
a21cdb88ac Merge branch 'PHP-7.4'
* PHP-7.4:
  Add test for bug #78569
2020-02-21 10:34:27 +01:00
Christoph M. Becker
1c6b084262 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add test for bug #78569
2020-02-21 10:32:45 +01:00
Christoph M. Becker
ad000a63e8 Add test for bug #78569 2020-02-21 10:31:26 +01:00