I play with a custom module in Drupal, but it gives me the following two warnings:
Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 377 of /site/includes/menu.inc). Warning: Invalid argument supplied for foreach() in menu_unserialize() (line 377 of /site/includes/menu.inc).
Here is the module code:
<?php function homepage_coords_menu(){ return array(//$items 'homepage_coords/%node/%/%' => array( 'page callback' => 'homepage_coords_ajax_callback', 'page arguments' => array(1,2,3), 'access arguments' => TRUE, 'type' => MENU_CALLBACK, ) ); } function homepage_coords_ajax_callback($nid=0,$x=0,$y=0){ return 'nid:'.$nid.' x:'.$x.' y:'.$y; } ?>
What can I do to fix these warnings?
Any performance improvements will also be appreciated :)
drupal drupal-7
Jane panda
source share