Bug #14541: strtok broken again

From: Date: Sun, 16 Dec 2001 07:15:53 +0000
Subject: Bug #14541: strtok broken again
Groups: php.dev 
Request: Send a blank email to php-dev+get-73977@lists.php.net to get a copy of this message
From: mlemos@acm.org Operating system: Any PHP version: 4.1.0 PHP Bug Type: Unknown/Other Function Bug description: strtok broken again It seems that strtok function is broken again. The following script returns: <? $first_token=strtok("/something","/"); $second_token=strtok("/"); var_dump($first_token,$second_token); ?> Should output as always (at least until PHP 4.0.6 it does): string(0) "" string(9) "something" But it outputs: string(9) "something" bool(false) It seems that jmoore broken in when he tried to fix this bug: http://bugs.php.net/bug.php?id=13866 I think that no developer should be allowed to fix bugs before: 1) submit a test case to leave in the tests directory 2) Verify that his fixes do not make his and others tests fail. Until this procedure becomes mandatory, we'll keep seeing a history of illness in functions like strtok that seems to never end. This is what regressive tests are for. Zak, please help here! :-) -- Edit bug report at: http://bugs.php.net/?id=14541&edit=1

« previous php.dev (#73977) next »