Re: substr passing null...
| From: | David Zülke | Date: | Thu, 29 Jan 2009 08:29:26 +0000 |
| Subject: | Re: substr passing null... | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-42874@lists.php.net to get a copy of this message | ||
Am 28.01.2009 um 18:41 schrieb Scott MacVicar:
Attachment: [application/pkcs7-signature] smime.p7s
Nathanael D. Noblet wrote:Out of curiosity - how hard would it be to implement a "default" keyword that can be passed in function/method calls with the new parameter parsing API? - DavidPeter Walther wrote:You're assumption is wrong then, NULL isn't treated as not passing a value. The reason it worked with substr was by pure chance.it's only a bug if you always expect optional NULL parameters to be ignored.Well that's the question I'm asking. I assumed optional parameters passed null should be ignored. If this isn't the behaviour php uses, then I'm good, but I've used passing null to optional params all over the place, and just recently had this one not work. If my logic / assumptions are flawed, that's fine otherwise I can file a bug.
Attachment: [application/pkcs7-signature] smime.p7s