By TuTToWeB on
hi to everyone,
i'm editing a module made by myself, but I get that error if I go to front page.
Recently, I added
$item['admin/CIF/Assicurazioni/link_table/%']= array
(
'title' => 'Linka tabelle',
'page callback' => 'assicurazioni_link',
'page arguments' => array(4),
'access arguments'=> array("amministrare assicurazioni"),
'type' => MENU_CALLBACK
);
on hook_menu and the following function (still incompleted)
function assicurazioni_link($aid)
{
$q_assicurazioni_tabelle = db_query("SELECT `nome`,`codice_tabella` FROM `{assicurazioni}`,`{assicurazioni_tabelle}` WHERE `id` = `id_assicurazione` AND `id` != %d ORDER BY `nome`,`codice_tabella` ASC",$aid);
$array = array();
while($r = db_fetch_object($q_assicurazioni_tabelle))
{
$array[$r->nome][] = $r->codice_tabella;
}
$options = "";
foreach($array as $assicurazione => $tabelle)
{
$options .="<optgroup label='".$assicurazione."'>";
foreach($tabelle as $t)
{
$options .="<option value='".$t."'>".$t."</option>";
}
$options .="</optgroup>";
}
$pagina ="<select name='tabella'></select>";
return $pagina;
}
I don't understand the nature of fatal error. I write everyday code likes that and I never got these kind of errors.
Could you help me? Thank you very much
Comments
Are you returning $item from
Are you returning $item from hook menu?
Contact me to contract me for D7 -> D10/11 migrations.
Of course. That's it: <?php
Of course. Here you are:
SOLVED
Inadvertently I used hook_link.