1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 20:22:36 +02:00
Commit Graph

4821 Commits

Author SHA1 Message Date
Nikita Popov
fec0ff8cb0 Merge branch 'PHP-7.4' 2019-10-04 12:42:58 +02:00
Nikita Popov
ca652aafa8 Fixed bug #78632
I'm going for a very conservative fix here, where the previous
logic is restored for the case where an object is passed to
method_exists(). We might want to check against EG(scope) instead,
but this seems like a safer choice.

This means that behavior in PHP 7.4 changes only for
method_exists('C', 'privateMethodNotOnC'), which should be sensible.
2019-10-04 12:41:49 +02:00
Christoph M. Becker
0edcd105f3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78620: Out of memory error
2019-10-04 09:14:36 +02:00
Christoph M. Becker
6627f782d6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #78620: Out of memory error
2019-10-04 09:11:18 +02:00
Christoph M. Becker
cf183a5e2c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78620: Out of memory error
2019-10-04 09:09:39 +02:00
Christoph M. Becker
abaf9a76dc Fix #78620: Out of memory error
The integer addition in `ZEND_MM_ALIGNED_SIZE_EX` can overflow, what we
have to catch early.
2019-10-04 09:08:01 +02:00
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
George Peter Banyard
d5e9ef8f0f Promote warnings to error in array_flip()
Closes GH-4576.
2019-10-02 12:31:02 +02:00
Christoph M. Becker
9fc5471578 Fix borked test case
Setting `CURLOPT_STDERR` can trigger a warning, what causes the test to
be marked as borked as of commit e49593a[1].  To avoid this, we silence
the `curl_setopt()` call.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=e49593a7c3159a5673ce74b4e5133f1264dc313f>
2019-10-02 11:37:33 +02:00
Nikita Popov
52ba5efaf7 Merge branch 'PHP-7.4' 2019-10-02 11:34:54 +02:00
Nikita Popov
d6a77c992f Avoid file clash in root_check skipifs 2019-10-02 11:34:32 +02:00
peter279k
1ea329d457 Fix bug #77204
Include opened path in getimagesize() error message
2019-10-02 11:21:17 +02:00
George Peter Banyard
1ca4ab09a5 Promote warnings to errors in array_push()
This is in line with the engine change from
https://wiki.php.net/rfc/engine_warnings.
2019-10-02 10:38:23 +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
Christoph M. Becker
76179cdf3d Merge branch 'PHP-7.4'
* PHP-7.4:
  Add missing skip keyword in tests
  Update NEWS for 7.4.0RC4
  Update NEWS for PHP 7.4.0RC3
2019-10-01 11:19:43 +02:00
Christoph M. Becker
73f29a5c5e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing skip keyword in tests
2019-10-01 11:17:53 +02:00
Christoph M. Becker
2fc5d00afa Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing skip keyword in tests
2019-10-01 11:15:12 +02:00
Fabien Villepinte
209e37db7d Add missing skip keyword in tests 2019-10-01 11:13:36 +02:00
Nikita Popov
235983dfde Merge branch 'PHP-7.4' 2019-09-30 17:52:39 +02:00
Fabien Villepinte
0aa3acc6c4 Fix borked SKIPIFs 2019-09-30 17:51:41 +02:00
Nikita Popov
c0a54f41b3 Merge branch 'PHP-7.4' 2019-09-30 15:06:51 +02:00
Nikita Popov
1f0ffece91 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-30 15:06:43 +02:00
Nikita Popov
0805e132b0 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-30 15:06:32 +02:00
Nikita Popov
6fcde56b03 Fixed bug #78612 2019-09-30 15:06:07 +02:00
Nikita Popov
1cde9e8528 Merge branch 'PHP-7.4' 2019-09-30 10:30:20 +02:00
Nikita Popov
1806ce9cb0 Add max_depth option to unserialize()
Add a max_depth option to unserialize and an unserialize_max_depth
ini setting, which can be used to control the depth limit. The
default value is 4096.

This option is intended to prevent stack overflows during the
unserialization of deeply nested structures.

This fixes bug #78549 and addresses oss-fuzz #17581, #17589, #17664,
and #17788.
2019-09-30 10:28:24 +02:00
Nikita Popov
0ebf2bdba0 Convert "Illegal offset type" warnings to exceptions 2019-09-27 13:00:07 +02:00
Nikita Popov
aa02c259f8 Merge branch 'PHP-7.4' 2019-09-27 11:12:13 +02:00
Nikita Popov
b154c12cc9 Fix file clash in rename_variation.phpt
rename_variation2.tmp is ... unsurprisingly ... already used by
rename_variation2.phpt. Alternatively it could be placed in the
directory that the test creates, but maybe this is intended to
test cross-directory renames, so I'll leave it.
2019-09-27 11:11:23 +02:00
Nikita Popov
34e7c2daf0 Merge branch 'PHP-7.4' 2019-09-27 10:49:25 +02:00
Nikita Popov
a6c9c7c2b8 Handle resources used as array keys consistently
Resources used as array keys are generally handled by throwing a
notice and converting the resource to the resource handle. The only
exception is the [$resource => null] syntax, where this was treated
as an illegal offset type instead. However, this also only happened
for VM evaluations, the AST evaluator did handle resources correctly.
2019-09-27 10:40:41 +02:00
Nikita Popov
a66c60cce3 Throw Error when writing property of non-object
This removes object auto-vivification support.

This also means that we can remove the corresponding special
handling for typed properites: We no longer need to check that a
property is convertible to stdClass if such a conversion might
take place indirectly due to a nested property write.

Additionally OBJ_W style operations now no longer modify the
object operand, and as such we no longer need to treat op1 as a
def in SSA form.

The next step would be to actually compile the whole LHS of OBJ_W
operations in R rather than W mode, but that causes issues with
SimpleXML, whose object handlers depend on the current compilation
structure.

Part of https://wiki.php.net/rfc/engine_warnings.
2019-09-27 10:11:47 +02:00
Nikita Popov
fb60ccc666 Merge branch 'PHP-7.4' 2019-09-25 11:03:19 +02:00
Nikita Popov
b8ef7c35ab Increase serialize_lock while decoding session
Avoid leaking state between Serializable::unserialize() and
session_decode().
2019-09-25 11:02:23 +02:00
Nikita Popov
b100d51ba2 Remove xfail on bug70219.phpt
Looks like this is working as it's supposed to, the test expectation
just needs to be adjusted.
2019-09-25 10:57:03 +02:00
Nikita Popov
131c1a5668 Merge branch 'PHP-7.4' 2019-09-23 17:18:45 +02:00
Nikita Popov
dbeeabed9b Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 17:18:39 +02:00
Nikita Popov
954d073833 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-23 17:18:33 +02:00
Nikita Popov
3ddb63dce1 Fix skipif condition 2019-09-23 17:17:52 +02:00
Nikita Popov
3a104c3c37 Merge branch 'PHP-7.4' 2019-09-23 16:43:04 +02:00
Nikita Popov
2bb04106be Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 16:42:59 +02:00
Nikita Popov
d0f4966b05 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-23 16:42:33 +02:00
Nikita Popov
bc4c4c658c Skip test on 32-bit 2019-09-23 16:42:24 +02:00
Nikita Popov
e441378b54 Update error messages in some more tests 2019-09-23 16:39:52 +02:00
Nikita Popov
8d7911ef56 Standardize type printing in reflection
Use ?T instead of "T or NULL".
2019-09-23 15:40:03 +02:00
Nikita Popov
9ec2480bd6 Merge branch 'PHP-7.4' 2019-09-23 14:52:45 +02:00
Nikita Popov
41335afed9 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-23 14:52:40 +02:00