|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-10-08 12:16 UTC] phofstetter at sensational dot ch
[2019-10-13 15:10 UTC] cmb@php.net
[2019-11-07 10:49 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2019-11-07 10:49 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 23 03:00:02 2025 UTC |
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