1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00
Commit Graph

2859 Commits

Author SHA1 Message Date
Dmitry Stogov
fd348ec43f GC improvement 2018-03-01 03:17:21 +03:00
Xinchen Hui
6a59f3714a Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76025 (Segfault while throwing exception in error_handler).
2018-02-28 18:07:15 +08:00
Xinchen Hui
858ebd9285 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76025 (Segfault while throwing exception in error_handler).
2018-02-28 18:06:49 +08:00
Xinchen Hui
d5c171311d Fixed bug #76025 (Segfault while throwing exception in error_handler). 2018-02-28 18:06:37 +08:00
Gabriel Caruso
e1cc4863d9 Remove duplicated tests 2018-02-22 13:03:21 +01:00
Gabriel Caruso
b895690dfa remove support for string|unicode in tests 2018-02-22 08:11:30 +01:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Dmitry Stogov
8b7cdbaa49 Separate slow path with make_real_object() and related code into "cold" function. 2018-02-20 17:22:11 +03:00
Gabriel Caruso
b8bb4d77ca Remove empty sections in tests 2018-02-14 11:10:59 +01:00
Gabriel Caruso
21e3b0c70c Remove trailing whitespace in inc files 2018-02-10 19:20:23 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Nikita Popov
1a3bdb4a2c Remove some references to E_STRICT in tests
run-tests.php enforces error_reporting=E_ALL (including E_STRICT),
setting this explicitly in not necessary. Conversely, after the
removal of some E_STRICT errors, explicitly excluding it is no
longer necessary in some places.
2018-02-03 18:17:12 +01:00
Gabriel Caruso
1624b0a91f Remove superfluous SKIPIF sections in Zend tests 2018-02-03 16:16:49 +01:00
Gabriel Caruso
53dbc69a8d Use %d when expecting line number in tests 2018-02-02 22:35:13 +01:00
Nikita Popov
3eaab04663 Merge branch 'PHP-7.2' 2018-01-15 12:16:16 +01:00
Nikita Popov
f3c1726d25 Merge branch 'PHP-7.1' into PHP-7.2 2018-01-15 12:16:00 +01:00
Nikita Popov
2023346973 Fixed bug #75079 2018-01-15 12:15:40 +01:00
Nikita Popov
6aa045e174 Merge branch 'PHP-7.2' 2018-01-13 11:06:58 +01:00
Nikita Popov
cf70e1910b Merge branch 'PHP-7.1' into PHP-7.2 2018-01-13 11:06:46 +01:00
Nikita Popov
8c07170ddb Fix generator GC if yield from parent chain does not reach root
Parents may be unlinked while another generator sharing part of the
chain is running. As such, we cannot assume that the parent chain
goes all the way to the root. Instead walk backwards from root to
leaf, like we also do during destruction.
2018-01-13 11:04:26 +01:00
Nikita Popov
d8d20020f5 Merge branch 'PHP-7.2' 2018-01-12 21:28:31 +01:00
Nikita Popov
e112b8474a Merge branch 'PHP-7.1' into PHP-7.2 2018-01-12 21:28:24 +01:00
Nikita Popov
420d11e8ca Fixed bug #75396
Do not run finally blocks in generators on unclean shutdown (e.g.
caused by exit). This is consistent with how finally blocks outside
of generators behave.
2018-01-12 21:27:23 +01:00
Nikita Popov
d9c706f28d Merge branch 'PHP-7.2' 2018-01-09 20:25:19 +01:00
Nikita Popov
2dd80a0782 Merge branch 'PHP-7.1' into PHP-7.2 2018-01-09 20:24:48 +01:00
Nikita Popov
fd30c59e04 Fixed bug #75786
SEND_UNPACK on iterators was duplicating references in-place,
which effectively leaks the original value and causes an off-by-one
refcount on the duplicated value.

Replace this with a deref, as an actual duplication is not even
needed in this case.
2018-01-09 20:20:31 +01:00
Xinchen Hui
1e22c9a187 Merge branch 'instanceof-const' of https://github.com/nikic/php-src
* 'instanceof-const' of https://github.com/nikic/php-src:
  Return false for instanceof on literal
2018-01-03 16:08:20 +08:00
Nikita Popov
b2b2b437af Add _IS_NUMBER as cast_object() target type
convert_scalar_to_number() will now call cast_object() with an
_IS_NUMBER argument, in which case the cast handler should return
either an integer or floating point number, whichever is more
appropriate.

Previously convert_scalar_to_number() unconditionally converted
objects to integers instead.

Fixes bug #53033.
Fixes bug #54973.
Fixes bug #73108.
2017-12-26 12:39:06 +01:00
Nikita Popov
688b9136ab Fixed bug #54043 2017-12-23 13:35:08 +01:00
Nikita Popov
b6131364f9 Return false for instanceof on literal 2017-12-19 22:16:45 +01:00
Nikita Popov
3fde27d87d Merge branch 'PHP-7.2' 2017-12-16 17:10:09 +01:00
Pedro Magalhães
83964e0468 Fix #75607 - Check if existing static trait property is a ref before comparing 2017-12-16 17:07:12 +01:00
David Walker
6d4de4cf05 Implement list() reference assignments
Support list() reference assignments of the form:

    list(&$a, list(&$b, $c)) = $d;

RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00
Xinchen Hui
60c742979d Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26)
  Revert "ext/sodium: pwhash: do not warn on low parameters"

Conflicts:
	Zend/zend_object_handlers.c
2017-11-29 14:54:05 +08:00
Xinchen Hui
bedf6093ad Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26)
2017-11-29 14:46:44 +08:00
Xinchen Hui
3b9ba7b6bd Fixed bug #75573 (Segmentation fault in 7.1.12 and 7.0.26) 2017-11-29 14:46:21 +08:00
Pedro Magalhães
179ed6e43d 63911: Compare opcodes of the op_array to determine different functions 2017-11-22 05:35:24 +00:00
Nikita Popov
1e3f625aa5 Merge branch 'PHP-7.2' 2017-11-15 23:01:52 +01:00
Nikita Popov
6640e03df8 Merge branch 'PHP-7.1' into PHP-7.2 2017-11-15 23:01:25 +01:00
DanielCiochiu
dba5a798a2 Fixed #74862: Unable to clone instance when private __clone defined
Even though __clone was implemented as private and called only from
parent class, child extending class instance could not be cloned.
2017-11-15 23:00:26 +01:00
Sammy Kaye Powers
b591c329ee Allow trailing commas in function and method calls 2017-11-06 07:13:56 +00:00
Pedro Magalhães
897bdb42f0 Fix #74922 - Try to resolve constants when importing trait properties 2017-11-02 21:06:27 +01:00
Dmitry Stogov
02a05146fd Fixed string interning during constants substitution 2017-11-01 10:56:37 +03:00
Dmitry Stogov
5baf657db3 Revert "Fixed string interning during constants substitution"
This reverts commit e0924c52fc.
2017-11-01 10:39:47 +03:00
Dmitry Stogov
e0924c52fc Fixed string interning during constants substitution 2017-11-01 10:34:39 +03:00
Nikita Popov
02d6c259b9 Fix gc_029_zts.phpt test
ZTS and NTS now behave the same here, so reduce this back to a
single test.
2017-10-30 23:05:53 +01:00
Dmitry Stogov
0366684ce3 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:17:49 +03:00
Dmitry Stogov
1d846fdfb2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed indirect modification of magic ArrayAccess method arguments
2017-10-26 16:07:49 +03:00