[FX.php List] FX_Error

Dale Bengston dbengston at preservationstudio.com
Tue Oct 10 13:30:13 MDT 2006


Right. The FX error object is an array. That's why I suggested  
writing it to the screen using print_r instead of echo. The FX error  
object does not have a ['data'] sub-array, which is why the foreach  
was failing.

Dale

On Oct 10, 2006, at 1:56 PM, Andrew Denman wrote:

> Also note that this is not an error generated by FileMaker, it is a  
> FX.php generated error.  In my error catching code I had to add a  
> check to see if the variable holding the data was an array to catch  
> these, as it returns an FX_Error object instead of the normal array  
> of information (which has the FileMaker error code).
>
>
>
> The only times I’ve received these errors are when FX.php couldn’t  
> read the XML returned (errors as Dan described below) or I got the  
> server address wrong.
>
>
>
> Andrew Denman
>
>
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list- 
> bounces at mail.iviking.org] On Behalf Of Dale Bengston
> Sent: Tuesday, October 10, 2006 1:28 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] FX_Error
>
>
>
> Hi David and David,
>
>
>
> Hmm, sounds like you're getting back something other than what  
> you're expecting from FX.
>
>
>
> It looks like your query is resulting in an error, which you are  
> trying to pick apart as an array to walk with foreach. Since the  
> results of your query ($productsResult) is some error text, not the  
> expected data array, PHP generates the fatal error message.
>
>
>
> Try putting print_r($productsResult); just above your foreach line  
> and see what you're really getting back from FileMaker via FX.
>
>
>
> Dale
>
>
>
>
>
> On Oct 10, 2006, at 12:30 PM, David Ness wrote:
>
>
>
>
> For what it's worth, I'm getting the very same error myself on a  
> specific page referencing a foreach statement. Didn't happen before  
> the update to FMSA 8.0v4
>
> --
>
> David Ness,
>
> Database Systems Programmer
>
> Bonded Builders Warranty Group
>
> 1500 Kings Highway
>
> Port Charlotte, FL 33980
>
> 800.749.0381 x3123 (National Toll Free)
>
> 941.255.3274 x3123 (Local)
>
>
>
> From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list- 
> bounces at mail.iviking.org] On Behalf Of David Tinoco
> Sent: Tuesday, October 10, 2006 1:22 PM
> To: fx.php_list at mail.iviking.org
> Subject: [FX.php List] FX_Error
>
> Hello everyone,
>
> My code has been working fine for a while now and suddenly, my page  
> spits back:
>
> Fatal error: Cannot use object of type FX_Error as array in c: 
> \Inetpub\wwwroot\testsite\search.php on line 146
>
> This line 146 corresponds to this:
>
> <? foreach($productsResult['data']as $key=>$productsData){ ?>
>
> Anyone have any idea why this would occur?
> Any help is appreciated.
>
> Thanks,
> David
>
> Stay connected with the news, people, places and online services  
> that matter to you on Live.com Try it!
>
> _______________________________________________
>
> 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/20061010/312e481d/attachment-0001.html


More information about the FX.php_List mailing list