title: Upgrade to Wordpress 4.6.1 and now "Warning: Invalid argument supplied for foreach() "
body: <p>I upgraded to Wordpress 4.6.1 and a calendar page that displayed data from a number of different post types, starting showing an error:</p>
  
  <blockquote>
    <p>Warning: Invalid argument supplied for foreach() in /home/centkuti/public_html/wp-content/themes/central-square-theater/page-templates/page-calendar.php on line 117</p>
  </blockquote>
  
  <p>This wasn't happening before the upgrade and I examined the code and it hasn't changed. Here are lines 115 to 120:</p>
  
  <pre><code>&lt;?php
    $prepost = get_post_custom_values('pre_post_related_show', $row-&gt;post_id);
    foreach($prepost as $v)
    {
      //echo $v;
    }
  ?&gt;
  </code></pre>
  
  <p>Your help is appreciated.</p>