[FX.php List] Error: Cannot use object of type FX_Error as array

Caleb Ruth cr at fmarchitect.com
Fri Aug 3 12:25:05 MDT 2007


The reason I thought it could be a configuration problem is that the  
exact same code works on one machine (OS X 10.4, php 5.2.1), but not  
the other (OS X 10.4 Server, php 5.2.1). However, they are both using  
the standard php.ini file that FMS9 installs.

Thank you for your suggestions for improved code.


-- 
Caleb Ruth | cr at fmarchitect.com  | 607-330-2058




On Aug 3, 2007, at 12:13 PM, Chris Hansen wrote:

> Hi all!
>
> In short, proper practice when using FX.php is to have a bit of  
> code like this right after your query is performed:
>
> if (FX::isError($invoiceData)) {
>     // error handling here
> }
>
> Then you'd have an elseif() to handle no records found, and any  
> other problems that may have cropped up.  This is a good habit to  
> form not only for FX.php, but FileMaker's API for PHP has an almost  
> identical means of trapping for errors.  HTH
>
> --Chris Hansen
>   FileMaker 8 Certified Developer
>   FileMaker 7 Certified Developer
>   Creator of FX.php
>   "The best way from FileMaker to the Web."
>   www.iViking.org
>
>
> On Aug 3, 2007, at 1:04 AM, Caleb Ruth wrote:
>
>> Hi All,
>>
>> I think I may have a configuration problem. I am getting the  
>> following error:
>> Fatal error: Cannot use object of type FX_Error as array in  
>> [filename].php on line 42
>>
>> The line reported is just this:
>> if($invoiceData['errorCode'] != 401)
>>
>> Any tips appreciated.
>>
>>
>> -- 
>> Caleb Ruth | cr at fmarchitect.com  | 607-330-2058
>>
>>
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> 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://www.iviking.org/pipermail/fx.php_list/attachments/20070803/45901bfc/attachment.html


More information about the FX.php_List mailing list