[FX.php List] Re: Error I've never seen before

Chris Hansen chris at iViking.org
Mon May 19 10:28:51 MDT 2008


I may be misunderstanding what's going on here, but the code as listed  
pre-change below shouldn't work.  Here's the signature line of the FX  
constructor:

function FX ($dataServer, $dataPort=591, $dataType='', $dataURLType='')

$dataURLType is the same as $scheme (assuming a standard  
server_data.php file), and therefore it's out of place as the third  
parameter.  Yes, there are defaults in there, but PHP has no way of  
knowing where a parameter belongs unless it's passed in the proper  
order (though depending on usage, you could call the function without  
a third parameter at all...)  So, if you want to specify a scheme, you  
also HAVE to have something in that third slot, even if it's just an  
empty string.  Results otherwise will be unpredictable (depending on  
the logic branching within FX.php in this case.)

Best,

--Chris

On May 18, 2008, at 9:59 AM, Bob Patin wrote:
> But $dataSourceType has a default, so it shouldn't be necessary.  
> I've got literally dozens of web apps running without it...
>
> The strange thing was that when I manually retyped the query, it  
> started working. I can only think that there is an invisible  
> character somewhere, which seems really hard to believe.
>
> BP
>
>
> On May 18, 2008, at 8:14 AM, Someone wrote:
>
>> Hi BP
>> I changed
>> $query=new FX($serverIP,$webCompanionPort,$scheme);
>> to
>> $query = new FX($serverIP, $webCompanionPort, $dataSourceType);
>> and it works
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>



More information about the FX.php_List mailing list