Commit Graph

5511 Commits

Author SHA1 Message Date
George Peter Banyard
c3105a1f8d ValueError for empty path in stream code
Closes GH-5902
2020-07-31 13:39:58 +01:00
twosee
ab9d10d023 Merge branch 'PHP-7.4'
* PHP-7.4:
  Handle bindto error
2020-07-29 17:48:01 +08:00
twosee
12bd3cc146 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Handle bindto error
2020-07-29 17:46:57 +08:00
twosee
0b8c83f593 Handle bindto error
Closes GH-5903.
2020-07-29 17:46:27 +08:00
George Peter Banyard
73e070a614 Refactor user streams to use ZPP class check
Closes GH-5876
2020-07-28 17:12:40 +01:00
Derick Rethans
877a351ea8 PHP-7.4 is 7.4.10-dev now 2020-07-26 10:08:52 +01:00
Tyson Andre
07db64156e [RFC] Make string length for getTraceAsString() configurable
Add a `zend.exception_string_param_max_len` ini setting.
(same suffix as `log_errors_max_len`)

Allow values between 0 and 1000000 bytes.
For example, with zend.exception_string_param_max_len=0,
"" would represent the empty string, and "..." would represent something
longer than the empty string.
Previously, this was hardcoded as exactly 15 bytes.

Discussion: https://externals.io/message/110717

Closes GH-5769
2020-07-25 09:50:57 -04:00
Nikita Popov
a1ab7bbc3a Simplify user_stream_create_object 2020-07-23 16:20:25 +02:00
Christoph M. Becker
fc4d462e94 Fix #78236: convert error on receiving variables when duplicate [
When an input variable name contains a non matched open bracket, we not
only have to replace that with an underscore, but also all following
forbidden characters.
2020-07-23 15:48:09 +02:00
Nikita Popov
93594862f4 Remove no longer needed stdint compatibility defines
Closes GH-5886.
2020-07-23 13:00:04 +02:00
twosee
6e92487f66 Fix warnings of strict-prototypes
Closes GH-5887.
2020-07-23 00:59:00 +08:00
Christoph M. Becker
2c0a6977dd 7.3 is now 7.3.22-dev 2020-07-21 09:18:07 +02:00
Benjamin Eberlei
6c8b94eb42 Introduce error notification callbacks that are run independant of zend_error_cb 2020-07-17 15:08:11 +02:00
Martin Schröder
547d98b81d Support socketpairs in proc_open()
Closes GH-5777.
2020-07-14 10:35:45 +02:00
Máté Kocsis
d30cd7d7e7
Review the usage of apostrophes in error messages
Closes GH-5590
2020-07-10 21:05:28 +02:00
Nikita Popov
302933daea Remove no_separation flag 2020-07-07 09:30:24 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
0280b83e11 Avoid some unnecessary uses of no_separation=0
For the rare cases where references are part of the API,
construct them explicitly. Otherwise do not allow separation.
2020-07-06 19:05:57 +02:00
Christoph M. Becker
2ecb4680ad Update php_version.h
That has apparently been overlooked.
2020-07-02 15:30:13 +02:00
Christoph M. Becker
43b5d58341 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79756: finfo_file crash (FILEINFO_MIME)
2020-06-29 17:47:21 +02:00
Christoph M. Becker
dfac28f8d8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79756: finfo_file crash (FILEINFO_MIME)
2020-06-29 17:46:46 +02:00
Christoph M. Becker
816b4c1235 Fix #79756: finfo_file crash (FILEINFO_MIME)
If `ctime` or `asctime` return `NULL`, we must not attempt to copy the
buffer, but rather return `NULL` as well.
2020-06-29 17:45:28 +02:00
Nikita Popov
afafe5443c Clear last error before shutting down memory manager
The last error is allocated using ZMM, make sure it's cleared
beforehand.

It would probably be better to allocate it persistently outside
of requests.
2020-06-26 09:30:08 +02:00
Alex Dowad
e673c63989 Correct comment in plain_wrapper.c (refers to microseconds, not milliseconds) 2020-06-24 22:26:00 +02:00
Christoph M. Becker
91982bad63 7.3 is now 7.3.21-dev 2020-06-23 10:29:42 +02:00
Christoph M. Becker
34ede22fd8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix possibly unsupported timercmp() usage
2020-06-09 16:56:35 +02:00
Christoph M. Becker
3c12c41927 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix possibly unsupported timercmp() usage
2020-06-09 16:54:43 +02:00
Christoph M. Becker
7ac0fb5ae4 Fix possibly unsupported timercmp() usage
The `timercmp()` manpage[1] points out that some systems have a broken
implementation which does not support `>=`.  This is definitely the
case for the Windows SDK, which only supports `<` and `>`.

[1] <https://linux.die.net/man/3/timercmp>
2020-06-09 16:52:19 +02:00
George Peter Banyard
c14371ef7b Fix incorrect zend_bool usage for display_errors 2020-06-09 11:43:37 +02:00
twosee
83a77015ad Add helper APIs for maybe-interned string creation
Add ZVAL_CHAR/RETVAL_CHAR/RETURN_CHAR as a shortcut for using
ZVAL_INTERNED_STRING and ZSTR_CHAR.

Add zend_string_init_fast() as a helper for the empty string /
one char interned string / zend_string_init() pattern.

Also add corresponding ZVAL_STRINGL_FAST etc macros.

Closes GH-5684.
2020-06-08 15:31:52 +02:00
twosee
88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
twosee
7d6a0ba808 Fix expression warnings and break warnings
Close GH-5675.
2020-06-07 10:41:11 +02:00
twosee
6260bc218f Remove duplicate zend_try
Closes GH-5672.
2020-06-07 10:37:14 +02:00
Nikita Popov
975acfe71e Pass zend_string message to zend_error_cb
This makes the zend_error_cb API simpler, and avoid formatting
the same message in multiple places.

It should be noted that the passed zend_string is always
non-persistent, so if you want to store it persistently somewhere,
you may still need to duplicate it.

The last_error_message is cleared a bit more aggressive, to make
sure it doesn't hang around across allocator life-cycles.

Closes GH-5639.
2020-06-05 09:54:02 +02:00
Nikita Popov
e949f306be Fixed bug #72089: Throw Error on require failure
It should be noted that we still throw the usual fopen warnings,
but the final fatal error becomes an Error exception. Combine
with @ to suppress FS warnings.

Closes GH-5641.
2020-06-05 09:46:39 +02:00
Daniel Ruf
cf513c2dc8 Fix small typo in comment 2020-05-31 15:03:09 +02:00
Christoph M. Becker
c249f593ef 7.3.20 will be next 2020-05-26 10:53:22 +02:00
Christoph M. Becker
c4badcbec4 Bump version
Seems that has been forgotten.
2020-05-19 17:24:18 +02:00
Christoph M. Becker
5a17694304 Merge branch 'PHP-7.4'
* PHP-7.4:
  Check compatibility with proper runtime DLL
2020-05-14 15:59:34 +02:00
Christoph M. Becker
bfcee2c746 Check compatibility with proper runtime DLL
In practise, this likely does not matter, because usually these DLLs
are installed side by side, but still we should check the proper DLL.
2020-05-14 15:57:55 +02:00
George Peter Banyard
8e66d22f7e Fix [-Wundef] warning in streams implementation 2020-05-12 22:01:20 +02:00
George Peter Banyard
1df3f97c21 Fix [-Wundef] warning in main folder 2020-05-12 22:01:00 +02:00
Stanislav Malyshev
c317c420b0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:21:25 -07:00
Stanislav Malyshev
355e36e4f6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:20:47 -07:00
Stanislav Malyshev
f43041250f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78876: Long variables cause OOM and temp files are not cleaned
  Fix #78875: Long filenames cause OOM and temp files are not cleaned
  Update NEWS for 7.2.31
  Update CREDITS for PHP 7.2.30
  Update NEWS for PHP 7.2.30
2020-05-11 14:20:41 -07:00
Christoph M. Becker
3c8582ca4b Fix #78876: Long variables cause OOM and temp files are not cleaned
We use the proper type for size calculations, which is `size_t`.
2020-05-11 13:48:40 -07:00
Christoph M. Becker
1c9bd513ac Fix #78875: Long filenames cause OOM and temp files are not cleaned
We must not cast `size_t` to `int` (unless the `size_t` value is
guaranteed to be less than or equal to `INT_MAX`).  In this case we can
declare `array_len` as `size_t` in the first place.
2020-05-11 13:47:38 -07:00
Nikita Popov
89b4a46d56 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix default sendmail path when not found during build
2020-05-11 10:46:07 +02:00
Nikita Popov
d050d74477 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix default sendmail path when not found during build
2020-05-11 10:46:00 +02:00
Indrek Ardel
517431892b Fix default sendmail path when not found during build
Closes GH-5548.
2020-05-11 10:45:23 +02:00