Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Fatal error issue

Aloittaja The Wizard, maaliskuu 12, 2014, 10:48:22 AP

« edellinen - seuraava »

The Wizard

Hello:

I keep getting the following error message -
LainaaFatal error: Function name must be a string in
and it's pointing to the code below. So whats wrong with the code?
I look up the problem and it seems it has to do with having [] insead of () but my question is where?

Wiz


function refresh()
{
$request = $smcFunc['db_query']('', "
SELECT wizard
FROM {db_prefix}members
WHERE id_member = {int:current_member}
LIMIT 1", array(
'current_member' => $user_info['id']
));

while ($row = $smcFunc['db_fetch_assoc']($request))
{
if (empty($row))
continue;

$image = explode(',', $row['wizard']);
}

if (empty($image))
return;

$context['toy_shop_inv']['items'] = $image;
$smcFunc['db_free_result']($request);
}

All Colours Sam

You need to globalize $smcFunc.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

The Wizard

I can't believe I missed that! Now I feel dumb...

Thanks

Suki

All Colours Sam

It happens to everyone. I often spend hours on an issue just to discover the next morning it was a missing ";" or a typo or some other silly error ::)

And the reason I knew the answer even before looking a the code is that the same has happened to me :P
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Advertisement: