[PATCH] Allow null to string conversion for PHP 6
| From: | Christian Schneider | Date: | Wed, 26 Mar 2008 00:55:20 +0000 |
| Subject: | [PATCH] Allow null to string conversion for PHP 6 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-36524@lists.php.net to get a copy of this message | ||
Playing around with PHP 6 I noticed that some functions start to
complain about conversion of null values to strings:
php -d error_reporting=65535 -r 'var_dump(urldecode(null));'
Warning: urldecode() expects parameter 1 to be strictly a binary string,
null given in Command line code on line 1
I think this is wrong and attached a patch against HEAD to fix this.
Note: While the patch seems a bit hacky at first it is IMHO the simplest
solution without having to resort to copy/paste or goto. But if you want
another solution I'm happy with that too :-)
- Chris