[FX.php List] FX_Error in iis only

Dale Bengston dbengston at tds.net
Fri Jul 10 12:52:44 MDT 2009


Yes, if your code generates an FX error, $result is a PHP object, not  
a PHP array. I use the built-in PHP function is_object() to trap this  
scenario.

Dale


On Jul 10, 2009, at 1:33 PM, Leo R. Lundgren wrote:

>
> 10 jul 2009 kl. 19.54 skrev John Funk:
>
>> $result =$request->FMFind();
>> $records =$result['data'];
>
> the $result you get back from $request->FMFind() is an instance of  
> the class FX_Error, and the problem is that you're not checking for  
> this but presuming that the result is not an error, and you try to  
> use it as an array in the second line.
>
> As Jonathan said, implement error checking. I'm sure the appropriate  
> code is described in the FX documentation :)
>
> -|
>
> _______________________________________________
> 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/20090710/a92a2572/attachment.html


More information about the FX.php_List mailing list