[FX.php List] Thoughts about line 1425 of FX.php

Dale Bengston dbengston at tds.net
Wed Jun 10 15:33:49 MDT 2009


Steve,

When did you get a warning like this? What triggered it? Or could you  
ever figure out why?

Dale

On Jun 10, 2009, at 2:34 PM, Steve Winter wrote:

> Partially answering my own question, but not wanting to stifle the  
> raging debate ;-) I turned line 1425 into;
>
> 	if(is_array($value)) {
>   	     foreach($value as $partKey => $partValue) {
>                    $tempQueryString .=  
> urlencode($key) . .urlencode('['.$partKey.']').'=' .  
> urlencode($partValue) . '&';
>              }	
>         } else {
>              $tempQueryString .= urlencode($key) . '=' .  
> urlencode($value) . '&';
>         }
>
> which seems to make the error go away (which is always nice ;-).  
> Anyone see any issues with this...?
>
> Cheers
> Steve
>
>
> On 10 Jun 2009, at 18:13, Steve Winter wrote:
>
>> Hi all,
>>
>> Not sure if anyone's ever seen this wee error;
>> 	Warning: urlencode() expects parameter 1 to be string, array given  
>> in /path/to/fx/FX.php on line 1425
>> but I periodically get it, and today I decided to try and find out  
>> why...
>>
>> Turns out that the function it's part of BuildLinkQueryString () is  
>> taking the posted parameters and attempting to create a nice URL  
>> friendly string...
>>
>> Nice idea and all that, and maybe I'm the only one who ever does  
>> it, but I periodically push form data into an array, and it's that  
>> which is causing the issue...
>>
>> So, does anyone know how important (or not) that function is to the  
>> internal workings of FX...? it appears that it's attempting to  
>> create the old CDML style LinkNext, LinkPrevious type URL  
>> strings... anyone ever use those these days...?? Is this data also  
>> sued for anything else, I don't think so, since previously I've  
>> just ignored the error, with seemingly no ill effects...
>>
>> If it is as legacy as it looks, is it perhaps time to retire that  
>> function...? Any thoughts on how to deal with the array concept in  
>> post variables...? I guess the array could be exploded and then  
>> rebuilt as a strong in the form  
>> array[]=fred&array[]=spoon&array[]=lives&array[]here but if it's  
>> not needed....???
>>
>> Cheers
>> Steve
>>
>>
>> Steve Winter
>> steve at bluecrocodile.co.nz
>> m: +44 77 7852 4776
>> 3 Calshot Court, Channel Way
>> Ocean Village, Southampton SO14 3GR
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> Steve Winter
> steve at bluecrocodile.co.nz
> m: +44 77 7852 4776
> 3 Calshot Court, Channel Way
> Ocean Village, Southampton SO14 3GR
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090610/a57ab7dc/attachment-0001.html


More information about the FX.php_List mailing list