Zen Cart Logo
Forums / All Other Contributions/Addons / Error in referrals.php - Cannot use object of type queryFactoryResult as array

Error in referrals.php - Cannot use object of type queryFactoryResult as array

Locked

Views: 5,693

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
7 Jun 2007, 8:17 AM
#1
agouti avatar

agouti

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Error in referrals.php - Cannot use object of type queryFactoryResult as array

Not sure if this is the right place to post, but here goes...

I'm receiving the following errors in the referals part of zen cart:

Fatal error: Cannot use object of type queryFactoryResult as array in [....]/admin/referrals.php on line 112
line 112 (formatted):

<td class="dataTableContent" align="right"> <?php if (isset($cInfo) && is_object($cInfo) && ($sources->fields['sources_id'] == $cInfo->sources_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . zen_href_link(FILENAME_REFERRALS, 'page=' . $_GET['page'] . '&sID=' . $sources['sources_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>

Fatal error: Cannot use object of type queryFactoryResult as array in [....]/admin/stats_referral_sources.php on line 86
line 86:
if ( zen_not_null($referrals['sources_name']) ) {

It's a fairly old version of Zen Cart (circa 2005 I believe), not sure how I can tell exactly what - referrals is 1.0, if that helps.

18 Jun 2007, 6:29 AM
#2
agouti avatar

agouti

New Zenner

Join Date:
Jun 2007
Posts:
6
Plugin Contributions:
0

Re: Error in referrals.php - Cannot use object of type queryFactoryResult as array

bump

18 Jun 2007, 9:03 AM
#3
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Error in referrals.php - Cannot use object of type queryFactoryResult as array

if ( zen_not_null($referrals['sources_name']) ) {

for:

if ( zen_not_null($referrals->fields['sources_name']) ) {
3 Jan 2009, 7:25 PM
#4
nagelkruid avatar

nagelkruid

Zen Follower

Join Date:
Nov 2006
Posts:
284
Plugin Contributions:
0

Re: Error in referrals.php - Cannot use object of type queryFactoryResult as array

TheOracle:

if ( zen_not_null($referrals['sources_name']) ) {

> 
> ```php
if ( zen_not_null($referrals->fields['sources_name']) ) {

wow, old thread.
still helped me resolve same problem in
admin/includes/modules/newsletters/product_notification.php
on line 219

cheers