[PHP-DEV] PHP 4.0 Bug #7560: strtok or while-loop never returns From: lrhazi <email protected>
Date: 10/31/00

From: lrhazi <email protected>
Operating system: Linux 2.2.15-4mdksecurei686
PHP version: 4.0.2
PHP Bug Type: Strings related
Bug description: strtok or while-loop never returns

function complete_email_addresses($ilist,$suffix){
        my_info("Entered compelte with [$ilist] and [$suffix]");
        if(($ilist == "")||($suffix == "")){
                my_info("leaving complete too early!");
                return $ilist;
        }
        $name1="";$result="";
        $name = strtok($ilist,",");
        while($name) {
                my_info("inside loop with [$name]");
                $name1 .=$suffix;
                $result .= $name1.",";
        }
        my_info("ilist completed : $result");
        return $result;
        
}

I call this function with ("toto"," <email protected>") and it never returns!

-- 
Edit Bug report at: http://bugs.php.net/?id=7560&edit=1

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>