[FX.php List] FX.php_List Digest, Vol 111, Issue 21
Dale Bengston
dale.bengston at gmail.com
Mon Dec 16 12:40:13 MST 2013
Aha! Yes, the result of a failed query is a PHP object, not an array. So you’ll need to trap whether $newSheetResult is an object or not before you try to reference its contents. I do this be evaluating my result:
if (is_object($newSheetResult))
{
// There is an error; proceed accordingly.
}
else
{
//The query produced results; proceed accordingly.
}
I believe in the case that $newSheetResult is an error, the error code can be referenced like this:
$newSheetResult->code
Hope this helps,
Dale
On Dec 16, 2013, at 1:30 PM, LELAND LONG <lelandlong at me.com> wrote:
> Well, it breaks in several ways, but let's try one problem at a time.
>
> The includes, in the header, had to be changed due to an apparent filename change:
> from: include_once('FX/FMErrors.php');
> to: include_once('FX/FX_Error.php');
>
> As soon as this was modified then my error handler generated an error.
> offending code: if ($newSheetResult['errorCode'] <> 0) {
> echo 'Sorry, but an error has occurred.';
> Exit;
> }
> error message: "Fatal error: Cannot use object of type FX_Error as array"
>
> Again, this worked fine in v4.2 and breaks in v6...
>
> Leland Long
>
>
>
> On Dec 16, 2013, at 1:27 PM, fx.php_list-request at mail.iviking.org wrote:
>
>> In what way do “things break?”
>>
>> Dale
>
> _______________________________________________
> 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/20131216/280e5bb6/attachment.html
More information about the FX.php_List
mailing list