From: [EMAIL PROTECTED]
Operating system: Linux and NT4
PHP version: 4.1.2
PHP Bug Type: Strings related
Bug description: ucwords() returns false when it should return ''
ucwords('') returns a type of boolean but it should return ''. This script
demonstrates the problem:
<?php
$s="a bc";
$s2=ucwords($s);
echo gettype($s2).":".$s2;
$s='';
$s2=ucwords($s);
echo gettype($s2).":".$s2;
?>
To get around it I do this after the ucwords() call:
if(!$s2)$s2='';
--
Edit bug report at http://bugs.php.net/?id=17517&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17517&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17517&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17517&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17517&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17517&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17517&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17517&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17517&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17517&r=globals