** Description changed: + [Impact] + + * Users hit an error with PHP7.0 when zend_print_flat_zval_r doesn't + consider a reference. + + 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_print_backtrace(); + } + + Expected result: + ---------------- + #0 test(Array ([0] => Array ([0] => a),[1] => b Object ())) called at [/Users/playcrab/Documents/code/php/test/test7.php:7] + + Actual result: + -------------- + #0 test(Array ([0] => PHP Notice: Array to string conversion in /Users/playcrab/Documents/code/php/test/test7.php on line 9 + PHP Stack trace: + PHP 1. {main}() /Users/playcrab/Documents/code/php/test/test7.php:0 + PHP 2. test() /Users/playcrab/Documents/code/php/test/test7.php:7 + PHP 3. debug_print_backtrace() /Users/playcrab/Documents/code/php/test/test7.php:9 + PHP Catchable fatal error: Object of class b could not be converted to string in /Users/playcrab/Documents/code/php/test/test7.php on line 9 + PHP Stack trace: + PHP 1. {main}() /Users/playcrab/Documents/code/php/test/test7.php:0 + PHP 2. test() /Users/playcrab/Documents/code/php/test/test7.php:7 + PHP 3. debug_print_backtrace() /Users/playcrab/Documents/code/php/test/test7.php:9 + + Notice: Array to string conversion in + /Users/playcrab/Documents/code/php/test/test7.php on line 9 + + Call Stack: + 0.0068 353088 1. {main}() /Users/playcrab/Documents/code/php/test/test7.php:0 + 0.0080 353928 2. test() /Users/playcrab/Documents/code/php/test/test7.php:7 + 0.0080 353928 3. debug_print_backtrace() /Users/playcrab/Documents/code/php/test/test7.php:9 + + Array,[1] => + Catchable fatal error: Object of class b could not be converted to string in /Users/playcrab/Documents/code/php/test/test7.php on line 9 + + Call Stack: + 0.0068 353088 1. {main}() /Users/playcrab/Documents/code/php/test/test7.php:0 + 0.0080 353928 2. test() /Users/playcrab/Documents/code/php/test/test7.php:7 + 0.0080 353928 3. debug_print_backtrace() /Users/playcrab/Documents/code/php/test/test7.php:9 + + + [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://bugs.php.net/bug.php?id=73916 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. Patch: http://git.php.net/?p=php- src.git;a=blobdiff;f=Zend/zend.c;h=2a47e9244ba787a2ad35e9220171b04d1a5de634;hp=3f3ca75e382b1dec98fd138307d812f36f02251e;hb=04379bcb1df25a9f9cc1d440f5c12105b9fbaf97;hpb=bd75f9e61375c7632bb55b0d49b470ecd94e8ec7
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1674892 Title: zend_print_flat_zval_r doesn't consider reference To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/php7.0/+bug/1674892/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs