Undefined index errors only on one subdomain On only one of my four registered domain names (foo.com, www.foo.com, foo.fr and www.foo.fr) am I'm getting undefined index errors such as:

Notice: Undefined index: vignettes in custom_page_preprocess_charger_accueil() (line 978 of /homez.119/retronom/www/sites/all/modules/custom/custom_page/custom_page.module).

The www.foo.com subdomain spits out these errors and is set up as a CNAME to foo.com.  I'm really stumped as to how this could affect only one of the subdomains.  What could cause these kinds of errors only on one?

Code setting up $varTemp:

//Vignette
if ($node-&gt;field_type['und']['0']['value'] == 1 &amp;&amp; $node-&gt;language == $GLOBALS['language_url']-&gt;language) {
  $varTemp['vignettes'][$j]['image'] = theme('image_style', array (
    'style_name' =&gt; 'quick_link',
    'path'       =&gt; $node-&gt;field_image['und']['0']['filename'], 
    'alt'        =&gt; $node-&gt;field_image['und']['0']['alt'],
    'title'      =&gt; $node-&gt;field_image['und']['0']['title'],
  ));

  $varTemp['vignettes'][$j]['link'] = $node-&gt;field_lien_site['und']['0']['value'];


Code that is failing:

While ($j != count($varTemp['vignettes'])) {  &lt;-- Line 978
  if ($varTemp['vignettes'][$i]) {
    if ($varTemp['vignettes'][$i]['column'] == 'A') {
      $vars['vignettes']['A'][$a]['image'] = $varTemp['vignettes'][$i]['image'];
      $vars['vignettes']['A'][$a]['link'] = $varTemp['vignettes'][$i]['link'];
      $vars['vignettes']['A'][$a]['ombre'] = $varTemp['vignettes'][$i]['ombre'];
      $vars['vignettes']['A'][$a]['title_link'] = $varTemp['vignettes'][$i]['title_link'];
      if (isset($varTemp['vignettes'][$i]['body'])) {
        $vars['vignettes']['A'][$a]['body'] = $varTemp['vignettes'][$i]['body'];
      }
      $a++;
    ...
    snip
    ...
}
Since you don't say anything about any debugging effort, it's hard to say, but one thing repeatedly stands out as clearly wrong

$node-&gt;field_X['und']['0']


which should always be

field_get_items($node, 'field_X);


Since your domains are foo.com, www.foo.com, foo.fr and www.foo.fr, this might indicate that you use more than one language, which is exactly when ['und']['0'] is likely to break for you. Notice that field_get_items() will return an array instead of a single value, so you will need to amend your code to deal with that.