Bug #17517 Updated: ucwords() returns false when it should return ''
| From: | hholzgra@php.net | Date: | Mon, 17 Jun 2002 11:38:03 +0000 |
| Subject: | Bug #17517 Updated: ucwords() returns false when it should return '' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10847@lists.php.net to get a copy of this message | ||
ID: 17517
Updated by: hholzgra@php.net
Reported By: darren@flyingcolor.com
-Status: Open
+Status: Closed
Bug Type: Strings related
Operating System: Linux and NT4
PHP Version: 4.1.2
New Comment:
fixed in CVS
Previous Comments:
------------------------------------------------------------------------
[2002-05-29 20:08:48] darren@flyingcolor.com
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 this bug report at http://bugs.php.net/?id=17517&edit=1