<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-mailStijl18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=NL link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
'#default_value' =&gt; variable_get('time_card_pay_periods', array('weekly')),<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
'#default_value' =&gt; variable_get('time_card_pay_periods', array['weekly']),<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Square brackets for your array?</span><span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Van:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
development-bounces@drupal.org [mailto:development-bounces@drupal.org] <b>Namens
</b>Cory Gilliam<br>
<b>Verzonden:</b> woensdag 13 januari 2010 6:07<br>
<b>Aan:</b> development@drupal.org<br>
<b>Onderwerp:</b> [development] Problem I am unable to locate<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><em>Starting a new module and cant find the solution for
this problem.&nbsp; I am trying to check the admin settings page for the
module, and I am getting this error:</em><i><br>
<br>
<em>Invalid argument supplied for foreach()</em></i> in <em>/home/dangerou/public_html/includes/menu.inc</em>
on line <em>258</em>.<br>
<br>
Here is the code in the .module:<br>
<br>
function time_card_menu() {<br>
&nbsp; $items['admin/settings/time_card'] = array(<br>
&nbsp;&nbsp;&nbsp; 'title' =&gt; 'Time card settings',<br>
&nbsp;&nbsp;&nbsp; 'description' =&gt; 'Change how time card behave.',<br>
&nbsp;&nbsp;&nbsp; 'page callback' =&gt; 'drupal_get_form',<br>
&nbsp;&nbsp;&nbsp; 'page arguments' =&gt; array('time_card_admin_settings'),<br>
&nbsp;&nbsp;&nbsp; 'access arguments' =&gt; array('administer site
configuration'),<br>
&nbsp;&nbsp;&nbsp; 'type' =&gt; MENU_NORMAL_ITEM,<br>
&nbsp;&nbsp;&nbsp; 'file' =&gt; 'time_card.admin.inc',<br>
&nbsp; );<br>
&nbsp;&nbsp;&nbsp; <br>
&nbsp;return $items;<br>
}<br>
<br>
Here is the code in the .inc:<br>
<br>
function time_card_admin_settings() {<br>
&nbsp;&nbsp;&nbsp; $options = array('weekly' =&gt; 'Weekly');<br>
<br>
&nbsp;&nbsp;&nbsp; $form['time_card_pay_periods'] = array(<br>
&nbsp;&nbsp;&nbsp; &nbsp; '#type' =&gt; 'checkboxes',<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '#title' =&gt; t('Your Pay Period is:'),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '#options' =&gt; $options,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '#default_value' =&gt; variable_get('time_card_pay_periods',
array('weekly')),<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; '#description' =&gt; t('This will tell
the system how many weeks of information to collect for hour totals.'),<br>
&nbsp; );<br>
<br>
&nbsp; return system_settings_form($form);<br>
<br>
}<br>
<br>
What is it that I am not seeing.<o:p></o:p></p>

</div>

</body>

</html>