1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

347 Commits

Author SHA1 Message Date
Joe Watkins 733a1e9df0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:52:25 +02:00
Joe Watkins de83036f13 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:56 +02:00
Joe Watkins 5b1bb23edf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76859 stream_get_line skips data if used with data-generating filter
2019-10-03 06:51:10 +02:00
Konstantin Kopachev 05560b67bc Fix #76859 stream_get_line skips data if used with data-generating filter
stream_get-line repeatedly calls php_stream_fill_read_buffer until
enough data is accumulated in buffer. However, when stream contains
filters attached to it, then each call to fill buffer essentially
resets buffer read/write pointers and new data is written over old.
This causes stream_get_line to skip parts of data from stream
This patch fixes such behavior, so fill buffer call will append.
2019-10-03 06:50:43 +02:00
Nikita Popov 2f92957fd3 Convert some notices to warnings
Part of https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:34:08 +02:00
Nikita Popov f10eb9f756 Merge branch 'PHP-7.4' 2019-09-11 10:32:27 +02:00
Nikita Popov 11f3e24190 Fixed bug #78506 2019-09-11 10:27:32 +02:00
Nikita Popov 148954101a Merge branch 'PHP-7.4' 2019-07-29 17:34:42 +02:00
Nikita Popov 536c91c535 Merge branch 'PHP-7.3' into PHP-7.4 2019-07-29 17:34:37 +02:00
Nikita Popov 44fe025c28 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-29 17:34:16 +02:00
Albert Casademont dc7aa22b18 Fix bug #78326
Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.
2019-07-29 17:33:57 +02:00
Nikita Popov 8d39510af8 Merge branch 'PHP-7.4' 2019-07-25 10:43:50 +02:00
Nikita Popov 1cbcf0f4f1 Throw notice for plain wrapper fread/fwrite errors
Similar to what is done for socket read/write errors.
2019-07-25 10:42:10 +02:00
Nikita Popov a1e2c8870e Merge branch 'PHP-7.4' 2019-07-22 17:26:01 +02:00
Nikita Popov d59aac58b3 Report errors from stream read and write operations
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.

As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).

I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
2019-07-22 17:17:28 +02:00
Christoph M. Becker a5b095650a Merge branch 'PHP-7.4'
* PHP-7.4:
  Revert "Temporarily skip test"
2019-07-11 23:34:09 +02:00
Christoph M. Becker d0d02ecc4e Revert "Temporarily skip test"
This reverts commit 4e5a717866.

As of commit 17f7fb7605 the test should
no longer hang.
2019-07-11 23:33:34 +02:00
Nikita Popov eabe0145d4 Merge branch 'PHP-7.4' 2019-07-11 13:00:06 +02:00
Nikita Popov d20fc5a192 Make proc_open_bug64438.phpt more robust
The test currently assumes that we'll first read the data of
stdout and stderr and then see eof on stdout and stderr. However
we could also read stdout, see eof on stdout, read stderr and see
eof on stderr, depending on timing.

Avoid output ordering issues by collecting events into a per-pipe
array, so interleaving is not visible.
2019-07-11 12:46:56 +02:00
Christoph M. Becker 2d926d994f Merge branch 'PHP-7.4'
* PHP-7.4:
  Temporarily skip test
2019-07-05 12:49:14 +02:00
Christoph M. Becker 4e5a717866 Temporarily skip test
This test hangs on Windows for ~10 minutes as of commit 30019f4, so we
temporarily skip it.  The issue will be investigated by Joe and myself
in due course.
2019-07-05 12:48:10 +02:00
Christoph M. Becker 801ab18ea7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove stream_socket_sendto.phpt
2019-06-26 17:01:29 +02:00
Nikita Popov 7d28a24c66 Remove stream_socket_sendto.phpt
Fails for me locally due to different number of warnings with
different messages. Rather than adding more wildcards I'm dropping
this test entirely, as it doesn't seem to test anything particularly
useful.

(cherry picked from commit 84333cad67)
2019-06-26 16:58:37 +02:00
Joe Watkins 549df61248 Merge branch 'PHP-7.4'
* PHP-7.4:
  This test is flaky, and some of it doesn't make sense.
2019-06-15 10:01:22 +02:00
Joe Watkins 3852a35fdb This test is flaky, and some of it doesn't make sense.
I've refactored based on the original bug report, related bugs, and commits
to php-src that were related to them.

It is supposed to be testing windows specific behaviour related to non-blocking pipes,
nevertheless the test runs everywhere.
2019-06-15 09:57:51 +02:00
Joe Watkins 956db0cdc2 Merge branch 'PHP-7.4'
* PHP-7.4:
  fix mac tests on azure
2019-06-14 12:58:13 +02:00
Joe Watkins f16b012116 fix mac tests on azure 2019-06-14 12:55:00 +02:00
Nikita Popov 7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Remi Collet cd687a4953 Merge branch 'PHP-7.4'
* PHP-7.4:
  ignore first gets time which is usually a few ms only
2019-06-05 11:50:20 +02:00
Remi Collet a0ce1df024 ignore first gets time which is usually a few ms only
in previous version, max_ms was "1" and "10" in travis/appveyor
having 10 by default make it fails on fast computer
2019-06-05 11:48:48 +02:00
Nikita Popov 1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Nikita Popov 0f337e901b Merge branch 'PHP-7.4' 2019-05-31 11:11:07 +02:00
Nikita Popov 84333cad67 Remove stream_socket_sendto.phpt
Fails for me locally due to different number of warnings with
different messages. Rather than adding more wildcards I'm dropping
this test entirely, as it doesn't seem to test anything particularly
useful.
2019-05-31 11:09:56 +02:00
Christoph M. Becker 297be5adc0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77938: socket_get_option error
2019-04-25 00:08:05 +02:00
Christoph M. Becker 6dbb1d9318 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77938: socket_get_option error
2019-04-25 00:06:15 +02:00
Christoph M. Becker ad0acc0aa9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77938: socket_get_option error
2019-04-25 00:04:37 +02:00
Christoph M. Becker fe202d99c8 Fix #77938: socket_get_option error
Since tcp_socket/ssl streams are not representable, we suppress the
redirect to fix the test case.
2019-04-25 00:03:45 +02:00
Nikita Popov 39bffff9ce Merge branch 'PHP-7.4' 2019-04-08 13:00:28 +02:00
Nikita Popov 897cb8bc6f Merge branch 'PHP-7.3' into PHP-7.4 2019-04-08 13:00:20 +02:00
Nikita Popov a90ac8b5b2 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-08 13:00:05 +02:00
twosee bdac9ef10d Preserve keys in emulate_read_fd_set()
Keys are already preserved in the non-emulated case.
2019-04-08 12:58:46 +02:00
Nikita Popov e446ccdf75 Merge branch 'PHP-7.4' 2019-03-25 17:46:33 +01:00
Nikita Popov 065255a0f8 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-25 17:46:28 +01:00
Nikita Popov e4d9d91462 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-25 17:45:03 +01:00
Vlad Temian ec2ecb7e12 Fix bug #77680: Correctly implement recursive mkdir on FTP stream
If the root directory was missing, an extra CWD without arguments was
made. Also, the MKD contained an empty string.

Now the CWD will use / and MKDs will be issued starting from the root
directory.
2019-03-25 17:43:46 +01:00
Nikita Popov c8458ddce1 Merge branch 'PHP-7.4' 2019-03-19 10:03:17 +01:00
Nikita Popov cfa2f0f598 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-19 10:03:11 +01:00
Nikita Popov d53e9c7392 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-19 10:03:05 +01:00
Vlad Temian fe2885d80a Fixed bug #77765
Set mode 40755 for directories, via FTP stream stat.

Because we already manage to CWD into the current directory,
we should set 40755 as mode, instead of 40644.
2019-03-19 10:02:38 +01:00