Re: Strange conversion

From: Date: Sun, 17 Dec 2000 12:42:37 +0000
Subject: Re: Strange conversion
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-41643@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > > DR>> Ok, I know it's a typo, but Jani and I think we should issue > DR>> a warning when someone passes an array as the 2nd parameter to > DR>> explode and then return FALSE. I've the patch already done, but > > Then you have to make _all_ functions that accept strings produce warning > (or, rather, notice) - otheriwse it would be inconsistent and raise > questions why this particular function produces warning while all others > don't. I have no problem changing all the functions in strings.c to check if no array is passed. I simply find it strange that an array is converted to the string "Array", when it is taken as a function parameter. Another solution is (I think it's a better one) that convert_string_to_ex dont try to convert an array to a string, but simply issues the warning or notice. Derick --------------------------------------------------------------------- PHP: Scripting the Web - www.php.net - derick@php.net --------------------------------------------------------------------- JDI Media Solutions - www.jdimedia.nl - d.rethans@jdimedia.nl H.v. Tussenbroekstraat 1 - 6952 BL Dieren - The Netherlands --------------------------------------------------------------------- "Give a man a fish; you have fed him for today. Teach a man to use the Net and he won't bother you for weeks." ---------------------------------------------------------------------

« previous php.dev (#41643) next »