[pmwiki-users] Irreproducible behavior - maybe a bug

Joachim Durchholz jo at durchholz.org
Wed May 11 15:48:14 CDT 2005


Radu wrote:

> Are you sure you didn't mean
> 
> function to_array($a) {
>   if (is_array($a))
>     return $a;
>   else
>     return array($a);
> }

No, not at all. If $a isn't an array, it should be interpreted as an 
empty array.

Note that PHP doesn't even have an array() function :-)

Regards,
Jo



More information about the pmwiki-users mailing list