Hello! Thanks for your great module, I'm using the latest version with Joomla 1.5 and a custom template.
I'm trying to display either a contact form if a user is logged in OR a login form if he's not, using the PHP module. It works for the login form, but the contact form can't seem to access the database correctly. Here's what I have so far:
<?php
global $mainframe;
$md_user = & JFactory::getUser();
$md_user_id = $md_user->get('id');
if ($md_user_id) {
$mod = JModuleHelper::getModule('mod_chronocontact', 'Ask a Soldier');
$content = JModuleHelper::renderModule($mod);
} else {
echo "<p>Please log in to ask a question.</p>";
$mod = JModuleHelper::getModule('mod_cblogin', null);
$content = JModuleHelper::renderModule($mod);
}
?>
And the errors that I get are:
Notice: Undefined offset: 0 in C:\wamp\www\aec\modules\mod_chronocontact\helper.php on line 17
Notice: Trying to get property of non-object in C:\wamp\www\aec\modules\mod_chronocontact\helper.php on line 17
Notice: Undefined property: stdClass::$imagever in C:\wamp\www\aec\modules\mod_chronocontact\helper.php on line 19
Notice: Undefined offset: 0 in C:\wamp\www\aec\modules\mod_chronocontact\helper.php on line 24
Notice: Trying to get property of non-object in C:\wamp\www\aec\modules\mod_chronocontact\helper.php on line 24
There is no form with this name or may be the form is unpublished, Please check the form and the url and the form management
Basically, the code fails when it tries to access rows[0] after a query. Do you have any idea what might be going on?