Bug #70029 [Csd]: nodeValue of DOMElement list content of children nodes

From: Date: Sun, 06 Sep 2015 08:05:19 +0000
Subject: Bug #70029 [Csd]: nodeValue of DOMElement list content of children nodes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195799@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70029&edit=1 ID: 70029 Updated by: mbeccati@php.net Reported by: Laurent dot Lyaudet at gmail dot com Summary: nodeValue of DOMElement list content of children nodes Status: Closed Type: Bug Package: DOM XML related Operating System: Debian Linux PHP Version: 5.4.42 Assigned To: cmb Block user comment: N Private report: N New Comment: Among other things, the fix breaks PHPUnit: https://revive.beccati.com/bamboo/browse/PHP-PHPUN-477 Previous Comments: ------------------------------------------------------------------------ [2015-09-06 01:11:19] me at kelunik dot com Yes, this is a bug, but I'd like to see it reverted and marked as WONTFIX. Fixing it has exactly zero benefits (except spec compliance) while it introduces a BC break and removes a useful features. ------------------------------------------------------------------------ [2015-09-05 20:02:23] bwoebi@php.net Could that fix please be noted in UPGRADING? That just broke my code... :-/ Yes, it's non-standard, but still an useful side-effect, ------------------------------------------------------------------------ [2015-09-05 00:05:30] cmb@php.net The fix for this bug has been committed. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2015-09-05 00:03:48] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=25a52d98d7cb2d4f3b3636eac45c71a1ae03c760 Log: Fix #70029: nodeValue of DOMElement list content of children nodes ------------------------------------------------------------------------ [2015-07-08 21:21:06] cmb@php.net Confirmed: <http://3v4l.org/nrYAR>. According to the "Document Object Model Core" specification[1] nodeValue is supposed to yield null for Element nodes, so the behavior may be considered as bug. However, it works this way since the beginnings of the DOM extension, and the documentation[2] isn't particularly clear with regard to the exact behavior, so changing the behavior would introduce a BC break which is not easily noticed. Nonetheless, this should be fixed for PHP 7 (even though beta1 has already been tagged, which marks the feature freeze), in my opinion. [1] <http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-F68D080> [2] <http://de2.php.net/manual/en/class.domnode.php#domnode.props.nodevalue> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=70029 -- Edit this bug report at https://bugs.php.net/bug.php?id=70029&edit=1

« previous php.bugs (#195799) next »