zend_print_flat_zval_r doesn't consider reference
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php7.0 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Nish Aravamudan | ||
Yakkety |
Fix Released
|
Undecided
|
Nish Aravamudan | ||
Zesty |
Fix Released
|
Undecided
|
Nish Aravamudan | ||
Artful |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Users hit an error with PHP7.0 when zend_print_
The following error may be triggered:
PHP Notice: Array to string conversion;
Catchable fatal error: Object could not be converted to string.
[Test Case]
* From the upstream bug:
$a = array('a');
class b{};
$b = new b;
$test[] =& $a;
$test[] =& $b;
test($test);
function test() {
debug_
}
Expected result:
----------------
#0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [/Users/
Actual result:
--------------
#0 test(Array ([0] => PHP Notice: Array to string conversion in /Users/
PHP Stack trace:
PHP 1. {main}() /Users/
PHP 2. test() /Users/
PHP 3. debug_print_
PHP Catchable fatal error: Object of class b could not be converted to string in /Users/
PHP Stack trace:
PHP 1. {main}() /Users/
PHP 2. test() /Users/
PHP 3. debug_print_
Notice: Array to string conversion in /Users/
Call Stack:
0.0068 353088 1. {main}() /Users/
0.0080 353928 2. test() /Users/
0.0080 353928 3. debug_print_
Array,[1] =>
Catchable fatal error: Object of class b could not be converted to string in /Users/
Call Stack:
0.0068 353088 1. {main}() /Users/
0.0080 353928 2. test() /Users/
0.0080 353928 3. debug_print_
[Regression Potential]
* I believe the regression potential is low to zero for this fix (via 7.0.18 upstream). The reason is that the code as-is in 16.04 does not work and leads to backtraces. The fix introduce upstream resolves the issue.
---
https:/
We've hit this bug in 7.0.15, the current/latest version for Xenial.
It was fixed in 7.0.16 by php.net, Feb 16 2017. It would be nice if Xenials packages would be updated to reflect this fix.
Changed in php7.0 (Ubuntu Artful): | |
status: | Fix Committed → Fix Released |
assignee: | Nish Aravamudan (nacc) → nobody |
Changed in php7.0 (Ubuntu Zesty): | |
assignee: | nobody → Nish Aravamudan (nacc) |
Changed in php7.0 (Ubuntu Yakkety): | |
assignee: | nobody → Nish Aravamudan (nacc) |
Changed in php7.0 (Ubuntu Xenial): | |
assignee: | nobody → Nish Aravamudan (nacc) |
description: | updated |
I plan on SRU'ing 7.0.17 once 17.04 releases (so the archive is open).