Bug #17561: str_repeat with 0 multiplier
| From: | lee at piclab dot com | Date: | Sun, 02 Jun 2002 07:06:23 +0000 |
| Subject: | Bug #17561: str_repeat with 0 multiplier | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9134@lists.php.net to get a copy of this message | ||
From: lee@piclab.com
Operating system:
PHP version: 4.2.1
PHP Bug Type: Feature/Change Request
Bug description: str_repeat with 0 multiplier
str_repeat() has the arbitary restriction that the multiplier argument has
to be greater than zero. This is pointless and annoying. It's obvious
that the right thing to do is to return an empty string for a multiplier
of zero, and this can be done with one line of code along the lines of
if ( 0 == mult ) return "";
Why not remove this restriction?
--
Edit bug report at http://bugs.php.net/?id=17561&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17561&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17561&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17561&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17561&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17561&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17561&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17561&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17561&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17561&r=globals