Commit graph

2758 commits

Author SHA1 Message Date
Joe Watkins
b0cacee303 Merge branch 'pull-request/2082' 2016-10-10 12:14:26 +01:00
Nikita Popov
f8a6df4706 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-08 17:00:56 +02:00
Nikita Popov
2a75f5026a Fix bug #66773, #66862
This a partial backport of 8754b19. It
a) fixes the class/function/constant import table confusion in the
   namespaced case, and
b) restricts conflict checks to a single file based on a filename
   pointer comparison.

It does not fix the issues with filename reuse (e.g. due to eval)
and late-bound classes. This part of the change requires globals
changes.
2016-10-08 17:00:27 +02:00
Nikita Popov
8754b191f7 Fix "already in use" check inconsistencies/bugs
This fixes the following issues:
 * "use function" and "use const" inside namespaced code were checking
   for conflicts against class imports. Now they always check against
   the correct symbol type.
 * Symbol conflicts are now always checked within a single file only.
   Previously class uses inside namespaced code were checked globally.
   This behavior is illegal because symbols from other files are not
   visible if opcache is used, resulting in behavioral discrepancies.
   Additionally this made the presence/absence of symbol errors dependent
   on autoloading order, which is volatile.
 * The "single file" restriction is now enforced by collecting defined
   symbols inside a separate hash table. Previously it was enforced
   (for the non-namespaced case) by comparing the filename of the
   symbol declaration. However this is inaccurate if the same filename
   is used multiple times, such as may happen if eval() is used.
 * Additionally the previous approach relies on symbols being registered
   at compile-time, which is not the case for late-bound classes, which
   makes the behavior dependent on class declaration order, as well as
   opcache (which may cause delayed early-binding).
 * Lastly, conflicts are now consistently checked for conditionally
   defined symbols. Previously only declaration-after-use conflicts were
   checked in this case. Now use-after-declaration conflicts are
   detected as well.
2016-10-07 00:12:55 +02:00
Nikita Popov
9f92bb80e4 Merge branch 'PHP-7.1' 2016-09-30 22:10:32 +02:00
Nikita Popov
02ba9d71ab Unwrap reference returns in cufa etc 2016-09-30 22:10:01 +02:00
Nikita Popov
6ec5816899 Merge branch 'PHP-7.1' 2016-09-28 23:23:01 +02:00
Nikita Popov
56a7646ab2 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-28 23:22:48 +02:00
Nikita Popov
e520b9e127 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 23:22:11 +02:00
Nikita Popov
1f5412982c Handle resource keys in constexpr arrays 2016-09-28 23:11:02 +02:00
Nikita Popov
40b8105cca Fix the constant array case as well 2016-09-28 23:05:21 +02:00
Nikita Popov
5bdd732d21 Merge branch 'PHP-7.1' 2016-09-28 22:39:17 +02:00
Nikita Popov
97066792b7 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-28 22:38:47 +02:00
Nikita Popov
437942d972 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-28 22:36:58 +02:00
Nikita Popov
99bf19c177 Check next_index_insert failure in ADD_ARRAY_ELEMENT 2016-09-28 22:35:27 +02:00
Nikita Popov
208fcee115 Merge branch 'PHP-7.1' 2016-09-28 21:43:58 +02:00
Nikita Popov
6f9e5684a1 Fix segfault when empty entry in keyed array assignment 2016-09-28 21:43:48 +02:00
Nikita Popov
3d04b5c288 Merge branch 'PHP-7.1' 2016-09-28 19:23:09 +02:00
Nikita Popov
bf907b9961 Revert ReflectionType::__toString() behavior + deprecate 2016-09-28 19:21:51 +02:00
Nikita Popov
2083007813 Merge branch 'PHP-7.1' 2016-09-27 19:49:01 +02:00
Nikita Popov
21f0be4792 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-27 19:48:50 +02:00
Nikita Popov
b7cbaa7f43 Fix bug #73181 2016-09-27 19:47:48 +02:00
Dmitry Stogov
3ba1016a24 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73156 (segfault on undefined function)
2016-09-26 14:18:59 +03:00
Dmitry Stogov
bca7f02933 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73156 (segfault on undefined function)
2016-09-26 14:17:27 +03:00
Dmitry Stogov
d279118422 Fixed bug #73156 (segfault on undefined function) 2016-09-26 14:14:57 +03:00
Nikita Popov
ebaba26d39 Merge branch 'PHP-7.1' 2016-09-25 12:39:33 +02:00
Nikita Popov
bd893061d6 Use SEND_USER for CONST|TMP as well
Otherwise we're missing the "expected to be a reference, value
given" warning that appears for ordinary calls to call_user_func().

Also update an UPGRADING note with recent changes wrt
call_user_func().
2016-09-25 12:39:23 +02:00
Nikita Popov
8c26762baf Merge branch 'PHP-7.1' 2016-09-24 22:46:43 +02:00
Nikita Popov
c7651c2396 Fix a couple of ASSIGN_DIM/OBJ inference bugs
Account for possible null return values better.
2016-09-24 22:43:27 +02:00
Nikita Popov
96305b456b Merge branch 'PHP-7.1' 2016-09-24 13:23:54 +02:00
Nikita Popov
453102b4a0 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-24 13:22:00 +02:00
Nikita Popov
8831a12da1 Fixed bug #73163 2016-09-24 13:18:43 +02:00
John Boehr
68e602ff0a Fix bug #69579 2016-09-22 12:38:07 +02:00
Nikita Popov
328ecb486f Merge branch 'PHP-7.1' 2016-09-22 12:35:29 +02:00
Nikita Popov
7cd2494bb8 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-22 12:34:55 +02:00
John Boehr
8e313becf4 Fix bug #69579 2016-09-22 12:32:37 +02:00
Xinchen Hui
40f0184564 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:59:41 +08:00
Xinchen Hui
a339523fe5 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73067 (__debugInfo crashes when throwing an exception)
2016-09-13 10:59:09 +08:00
Xinchen Hui
2d8ab51576 Fixed bug #73067 (__debugInfo crashes when throwing an exception) 2016-09-13 10:58:57 +08:00
Christoph M. Becker
fcc6f2df59 Merge branch 'PHP-7.1' 2016-09-06 14:15:05 +02:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Anatol Belski
c563db6b44 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Implement \ArgumentCountError exception
2016-08-31 12:07:38 +02:00
Davey Shafik
12ee17d5e0 Implement \ArgumentCountError exception 2016-08-30 19:35:56 -07:00
Dmitry Stogov
6318c80347 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:15:37 +03:00
Dmitry Stogov
b5bab0fce8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72944 (Null pointer deref in zval_delref_p).
2016-08-29 12:07:54 +03:00
Dmitry Stogov
b66039db33 Fixed bug #72944 (Null pointer deref in zval_delref_p). 2016-08-29 12:02:50 +03:00
Xinchen Hui
5ac49731cf Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #72943 (assign_dim on string doesn't reset hval)
2016-08-26 18:33:10 +08:00
Xinchen Hui
557f1ccf0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #72943 (assign_dim on string doesn't reset hval)

Conflicts:
	Zend/zend_execute.c
2016-08-26 18:32:54 +08:00
Xinchen Hui
c67fa3c91d Fixed bug #72943 (assign_dim on string doesn't reset hval) 2016-08-26 18:30:08 +08:00
Dmitry Stogov
0e3e3ec7b6 Merge branch 'PHP-7.1'
* PHP-7.1:
  Added tests and NEWS entry Fixed bug #72598 (Reference is lost after array_slice())
2016-08-23 12:16:36 +03:00