Bug #53252 [Asn->Csd]: Invalid type (boolean) returned by substr() when providing an empty string

From: Date: Sun, 07 Nov 2010 19:54:22 +0000
Subject: Bug #53252 [Asn->Csd]: Invalid type (boolean) returned by substr() when providing an empty string
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-5498@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53252&edit=1 ID: 53252 Updated by: frozenfire@php.net Reported by: cagret at gmail dot com Summary: Invalid type (boolean) returned by substr() when providing an empty string -Status: Assigned +Status: Closed Type: Bug Package: Documentation problem Operating System: Linux, Windows PHP Version: 5.3.3 Assigned To: frozenfire Block user comment: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2010-11-07 20:53:47] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=305175 Log: Indicated change to substr's behaviour with start positions beyond truncation positions. Added changelog indicating this BC break. Bug #53252. ------------------------------------------------------------------------ [2010-11-07 16:28:33] philip@php.net Sorry, I'm being unclear this early morning. It's $rest = substr("abcdef", 4, -4) that changed with 5.2.2, the other examples here have always been false. The change probably relates to PHP Bug #40754 In the very least, the substr() documentation needs a changelog entry. ------------------------------------------------------------------------ [2010-11-07 16:28:15] frozenfire@php.net This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. ------------------------------------------------------------------------ [2010-11-07 16:23:33] philip@php.net I referred to the documentation example above. Passing in an empty string always returned false. ------------------------------------------------------------------------ [2010-11-07 16:21:22] philip@php.net 5.2.2 broke this (or fixed) but it's a BC issue. Before this time, it returned "". ------------------------------------------------------------------------ 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 http://bugs.php.net/bug.php?id=53252 -- Edit this bug report at http://bugs.php.net/bug.php?id=53252&edit=1

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