[FX.php List] Re: FX.php_List Digest, Vol 35, Issue 1

Lindal, Mark mlindal at pfc.forestry.ca
Tue Jun 5 11:51:15 MDT 2007


I solved it.
The answer was someone had pasted MS Word junk into the database and the
FX.php didn't like it and choked.  We located the record and cleaned the bad
nasty MS Word character out of it and now it works!

But as Chris wrote below, I have not been doing error checking as well as I
should and will in the future.  The trick in this case is I am glad this
happened so that we rooted out the corrupt characters from the database
quickly.

-------
>I just out of the blue got this message that is appears on a page:
>
>Fatal error: Cannot use object of type FX_Error as array in
>D:\Apache\htdocs\newpubs_e.php on line 109
>
>Page has worked flawlessly for months and can't see anything in code that
>might cause it.  Might it be server related?
------------------------------

> Mark,
> 
> The only way you'd see this is if you're not performing error
> checking on the data that comes back from FX.php.  (Gasp!)  Even
> though you want to assume that things will always work properly, you
> should always do a check like this in your code:
> 
> if (FX::isError($myReturnedData)) {
>      ...handle errors gracefully here...
> }
> 
> You'll want to have a look inside the object in question
> (specifically in the $message property of the returned object) and
> see what happened.  This is a general heads up to the list: _always_
> perform error checking!  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

------------------------------
Mark Lindal
mlindal at nrcan.gc.ca
250-363-0603





More information about the FX.php_List mailing list