Bug #17517: ucwords() returns false when it should return ''

From: Date: Thu, 30 May 2002 00:08:48 +0000
Subject: Bug #17517: ucwords() returns false when it should return ''
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8880@lists.php.net to get a copy of this message
From: darren@flyingcolor.com 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

« previous php.bugs (#8880) next »