PHP 4.0 Bug #5592: uksort() adds NULL data
| From: | colin at easydns dot com | Date: | Fri, 14 Jul 2000 17:38:00 +0000 |
| Subject: | PHP 4.0 Bug #5592: uksort() adds NULL data | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-24477@lists.php.net to get a copy of this message | ||
From: colin@easydns.com
Operating system: RH6.2
PHP version: 4.0.0
PHP Bug Type: Misbehaving function
Bug description: uksort() adds NULL data
In a uksort() function, the definition of the user-compare function is something like:
function compare($a,$b) {
...
}
In that compare function, $a and $b have null data appended to them. For example, put this inside
the compare function:
echo urlencode($a);
and you will get something like:
keyvalue%00
I can solve this by trim()-ing $a and $b all the time, but I think this is more of a bug that should
be fixed internally.
- Colin