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

From: Date: Tue, 08 Oct 2019 12:13:30 +0000
Subject: Doc #78645 [NEW]: Upgrading notes are missing a note about default empty objects
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16988@lists.php.net to get a copy of this message
From: phofstetter at sensational dot ch Operating system: macOS, Linux PHP version: 7.4.0RC3 Package: Documentation problem Bug Type: Documentation Problem Bug description:Upgrading notes are missing a note about default empty objects 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 bug report at https://bugs.php.net/bug.php?id=78645&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=78645&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78645&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78645&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78645&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78645&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78645&r=support Expected behavior: https://bugs.php.net/fix.php?id=78645&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78645&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78645&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78645&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=78645&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=78645&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78645&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78645&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78645&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78645&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78645&r=mysqlcfg

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