Commit Graph

1392 Commits

Author SHA1 Message Date
Xinchen Hui
6a6c273893 Fixed bug #66609 (php crashes with __get() and ++ operator in some cases) 2015-03-10 15:36:42 +08:00
Stanislav Malyshev
d7931f8f66 Merge branch 'pull-request/1130' into PHP-5.5
* pull-request/1130:
  Add missing value for error_reporting directive
2015-03-08 17:05:37 -07:00
Xinchen Hui
f039225597 Fixed bug #69174 (leaks when unused inner class use traits precedence) 2015-03-05 18:39:50 +08:00
Lior Kaplan
1a35c959a9 Add missing value for error_reporting directive 2015-03-01 15:16:53 +02:00
Xinchen Hui
c2062ca470 Added test for #69017 2015-02-12 11:28:16 +08:00
Reeze Xia
4d034b1a1e Improve tests for bug 67436
I always use a.php or b.php for local testing,
this diff makes the test more stable
2015-02-07 14:11:09 +08:00
Nikita Popov
aa394e70ff Fix bug #67111
Loop variables need to be freed for both "break" and "continue".

I'm adding the test to Zend/ because it's good to have a test for
this even without opcache.
2014-12-19 21:42:42 +01:00
Kévin Dunglas
ee226b961c Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor) 2014-12-12 14:58:23 +01:00
Julien Pauli
7c77ca38b1 Fix #65419 - Inside trait, self::class != __CLASS__ 2014-11-28 13:24:25 +01:00
Xinchen Hui
ab84939254 Fixed bug #68370 ("unset($this)" can make the program crash) 2014-11-10 13:46:47 +08:00
Nikita Popov
93288d0095 Fix bug #68188 2014-10-03 21:26:39 +02:00
Nikita Popov
5e977e69e1 Fixed bug #67633 2014-09-20 21:46:25 +02:00
Tjerk Meesters
aca474fa14 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed #67985 - Incorrect last used array index copied to new array after unset
2014-09-09 18:00:49 +08:00
Tjerk Meesters
99f0760bfb Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
2014-09-09 17:58:45 +08:00
Xinchen Hui
8ff00e6e85 Improve fix for #66608 2014-07-19 17:19:01 +08:00
Xinchen Hui
9ce1a36af2 Fixed segfault with empty break 2014-07-19 15:30:50 +08:00
Xinchen Hui
de433d4c47 Fixed bug #66608 (Incorrect behavior with nested "finally" blocks) 2014-07-18 15:45:31 +08:00
Nikita Popov
d9ebd0f3d6 Fix bug #67497: eval with parse error causes segfault in generator 2014-07-02 17:33:31 +02:00
Bob Weinand
03ee0ddc5f Merge branch 'PHP-5.4' into PHP-5.5 2014-06-16 00:41:46 +02:00
Levi Morrison
6c9c44905e Added tests for bug 67436 2014-06-15 16:31:39 -06:00
Levi Morrison
f47976dd9b Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.
2014-06-08 18:59:44 -07:00
Levi Morrison
e030efa4f6 Fix bug 666222
This also adds some smaller, isolated tests related to bug 66622.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2014-06-08 18:59:23 -07:00
Anatol Belski
d963cf94a5 refixed the test related to bug #67072 2014-04-18 15:16:09 +02:00
Tjerk Meesters
5e988a888a Fixed test case for 5328d42 2014-04-17 17:36:03 -07:00
Nikita Popov
d992a972c0 Merge branch 'PHP-5.4' into PHP-5.5 2014-01-04 01:24:54 +01:00
Nikita Popov
7e8e21df0c Fix bug #66286: Incorrect object comparison with inheritance
std_compare_objects immidiately returned 0 if the property tables
of both objects contain NULL at some index. Thus it would report
objects as equal even though properties following after that
differ.
2014-01-04 01:22:14 +01:00
Eric Stenson
330168a247 Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself.  As a
result, these tests become false positives.

On Windows boxes, the microtime precision is not granular enough
to reliably register a difference if two calls to uniqid() are made
concurrently.  This is a fix to the uniqid() test to avoid the false
positive when run on Windows machines.  Also, added a test to exercise
the 'more_entropy' variant of uniqid().
2013-12-15 16:51:21 +08:00
Xinchen Hui
dde552f2ee Add Tests for #65784 in 5.5 2013-12-13 01:45:45 +08:00
Remi Collet
9f4d1ee51c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #66218 zend_register_functions breaks reflection
2013-12-10 16:09:41 +01:00
Remi Collet
3e963f8eb4 Fixed Bug #66218 zend_register_functions breaks reflection
Functions registered using zend_register_functions instead of zend_module_entry.functions are not seen on reflection.

Ex: additional_functions from api_module_entry.
Ex: in CLI, dl, cli_set_process_title and cli_get_process_title

Note:
- also affects functions overrided in extension
  (should be be reported in extension, where overrided, not in original extension)
- also allow extension to call zend_register_functions for various list
  (instead of having a single bug list)
2013-12-10 16:07:16 +01:00
Nikita Popov
02dca18b90 Fix bug #65764
I'm not exactly sure whether this is the right way to fix it. The
question is whether Generator::throw() on a newborn generator (i.e.
a generator that is not yet at yield expression) should first advance to
the first yield and throw the exception there or whether it should
instead throw the exception in the caller's context.

The old behavior was to throw it at the start of the function (i.e.
the very first opcode), which causes issues like the one in #65764.
Effectively it's impossible to properly handle the exceptions in this
case.

For now I choose the variant where the generator advances to the
first yield before throwing, as that's consistent with how all other
methods on the Generator object currently behave. This does not
necessarily match the behavior in other languages, e.g. Python would throw
the exception in the caller's context. But then our send() method already
has this kind of deviation, so it stays internally consistent at least.
2013-12-01 13:37:56 +01:00
Nikita Popov
9589cae8cb Fixed bug #66041: list() fails to unpack yielded ArrayAccess object
Yield return values now use IS_VAR rather than IS_TMP_VAR. This
fixes the issue with list() and should also be faster as it avoids
doing a zval copy.
2013-11-30 13:08:31 +01:00
Dmitry Stogov
92b76680e9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65969 (Chain assignment with T_LIST failure)

Conflicts:
	NEWS
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-11-27 14:39:40 +04:00
Dmitry Stogov
16d59aa171 Fixed bug #65969 (Chain assignment with T_LIST failure) 2013-11-27 14:26:34 +04:00
Nikita Popov
865f221627 Merge branch 'PHP-5.4' into PHP-5.5 2013-10-16 18:37:49 +02:00
bwoebi
4c0bb6d76e Fixed bug #65911 ($this not usable as static property)
In context of static accesses like classname::$this, the string
"$this" should not be handled like a $this variable, but as an
identifier for a static variable.
2013-10-16 18:33:14 +02:00
Nikita Popov
6b68f44e6b Fix bug #64979: Wrong behavior of static variables in closure generators 2013-09-29 20:18:12 +02:00
Nikita Popov
1d1fb69c8b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-29 18:01:18 +02:00
Nikita Popov
f0c926564c Fix bug #65322: compile time errors won't trigger auto loading
Also fixes duplicate bugs #54054 and #42098.

Furthermore this fixes incorrect error messages thrown from code
running inside an error handler when a compilation is in progress.
The error file and line are now correctly associated with the
file/line of the executor, rather than the compiler.
2013-09-29 17:58:25 +02:00
Xinchen Hui
b2ee1b629e Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:16:07 +08:00
Xinchen Hui
6c48c6bc78 Typo.... 2013-09-02 16:15:52 +08:00
Xinchen Hui
dd1cbd140b Merge branch 'PHP-5.4' into PHP-5.5 2013-09-02 16:02:59 +08:00
Xinchen Hui
ed038d2ee3 Add a XFAIL test for #64896 2013-09-02 16:02:24 +08:00
Xinchen Hui
e4fe53e200 Merge branch 'PHP-5.4' into PHP-5.5 2013-08-30 11:20:46 +08:00
Xinchen Hui
7da6498342 Fixed bug #60598 (cli/apache sapi segfault on objects manipulation) 2013-08-30 11:20:24 +08:00
Xinchen Hui
f0cb67402f Merge branch 'PHP-5.4' into PHP-5.5 2013-08-29 14:01:54 +08:00
Adam Harvey
72027cd084 Fix bug #65579 (Using traits with get_class_methods causes segfault).
Specifically, this checks if there are trait aliases defined in the class scope
before attempting to dereference the first trait alias. This handles the case
where a trait alias was used in a child trait but no aliases exist in the
concrete class.
2013-08-28 20:33:42 -07:00
Marcel Araujo
265224778b Use in preg_replace_callback() using variables by reference and test for bug #64979 2013-08-18 15:18:30 -07:00
Marcel Araujo
47678c06c6 https://bugs.php.net/bug.php?id=64979 2013-08-18 15:09:43 -07:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00