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

jaypan’s picture

Are you returning $item from hook menu?

Contact me to contract me for D7 -> D10/11 migrations.

TuTToWeB’s picture

Of course. Here you are:

  $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
  );

  $item['admin/CIF/Assicurazioni/lock/%/%']= array
  (
  	'title'           => 'Archiviazioni tabelle assicurative',
    'page callback'   => 'assicurazioni_lock',
    'page arguments'  => array(4,5),
    'access arguments'=> array("amministrare assicurazioni"),
    'type'            => MENU_CALLBACK
  );

  return $item;
}
TuTToWeB’s picture

Inadvertently I used hook_link.