Doc #78645 [Opn]: Upgrading notes are missing a note about default empty objects

From: Date: Sun, 13 Oct 2019 15:10:38 +0000
Subject: Doc #78645 [Opn]: Upgrading notes are missing a note about default empty objects
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17004@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78645&edit=1 ID: 78645 Updated by: cmb@php.net Reported by: phofstetter at sensational dot ch Summary: Upgrading notes are missing a note about default empty objects Status: Open Type: Documentation Problem Package: Documentation problem Operating System: macOS, Linux PHP Version: 7.4.0RC3 Block user comment: N Private report: N New Comment: Well, this has be treated as bug(-fix)[1], and as such has only a mention in NEWS. [1] <http://git.php.net/?p=php-src.git;a=commit;h=e63febb1c772e15c1da891f00e3a343090e43c67> Previous Comments: ------------------------------------------------------------------------ [2019-10-08 12:16:25] phofstetter at sensational dot ch when I said > Prior to 7,4 only the second line of the test script would throw a warning I meant > Prior to 7,4 only the *first* line of the test script would throw a warning ------------------------------------------------------------------------ [2019-10-08 12:13:30] phofstetter at sensational dot ch Description: ------------ When testing our codebase with PHP 7.4, I noticed that some third-party library (Smarty) was relying on broken behavior of PHP versions prior to 7.4 that was apparently fixed in 7.4: Prior to 7,4 only the second line of the test script would throw a warning. In 7.4, both lines throw a warning. <?php $foo=null; $foo->bar = "baz"; // does throw warning in <7.4 $foo=null; $foo->bar["baz"] = "baz"; // doesn't throw warning in <7.4 I'm not asking for the old obviously broken behavior to be restored, but seeing that some still somewhat widely used piece of software is relying on this bug, it may make sense to add a note to the UPGRADING.txt file. Test script: --------------- <?php $foo=null; $foo->bar = "baz"; // does throw warning $foo=null; $foo->bar["baz"] = "baz"; // doesn't throw warning Expected result: ---------------- one warning Actual result: -------------- two warnings ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78645&edit=1

« previous php.doc.bugs (#17004) next »