[development] Problem I am unable to locate

Joop Sint Jago j.sintjago at xs4all.nl
Wed Jan 13 05:57:10 UTC 2010

        '#default_value' => variable_get('time_card_pay_periods',

        '#default_value' => variable_get('time_card_pay_periods',


Square brackets for your array?


Van: development-bounces at drupal.org [mailto:development-bounces at drupal.org]
Namens Cory Gilliam
Verzonden: woensdag 13 januari 2010 6:07
Aan: development at drupal.org
Onderwerp: [development] Problem I am unable to locate


Starting a new module and cant find the solution for this problem.  I am
trying to check the admin settings page for the module, and I am getting
this error:

Invalid argument supplied for foreach() in
/home/dangerou/public_html/includes/menu.inc on line 258.

Here is the code in the .module:

function time_card_menu() {
  $items['admin/settings/time_card'] = array(
    'title' => 'Time card settings',
    'description' => 'Change how time card behave.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('time_card_admin_settings'),
    'access arguments' => array('administer site configuration'),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'time_card.admin.inc',
 return $items;

Here is the code in the .inc:

function time_card_admin_settings() {
    $options = array('weekly' => 'Weekly');

    $form['time_card_pay_periods'] = array(
      '#type' => 'checkboxes',
        '#title' => t('Your Pay Period is:'),
        '#options' => $options,
        '#default_value' => variable_get('time_card_pay_periods',
        '#description' => t('This will tell the system how many weeks of
information to collect for hour totals.'),

  return system_settings_form($form);


What is it that I am not seeing.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20100113/427aa2f5/attachment.html 

More information about the development mailing list