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);
}
You need to globalize $smcFunc.
I can't believe I missed that! Now I feel dumb...
Thanks
Suki
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