title: Solving 'Argument #2 should be an array in'
body: <p>I'm working with the following code <a href="https://stackoverflow.com/questions/8461152/exempting-pdf-doc-and-xls-from-screen-grab-utility">kindly supplied in an answer here</a> but it generates the following errors</p>
  
  <pre><code>Warning: array_map() [function.array-map]: Argument #2 should be an array in [path/to] on [Line #]
  </code></pre>
  
  <p>and </p>
  
  <pre><code>'Warning: Wrong parameter count for array_intersect() in [path/to] on [line #]'
  </code></pre>
  
  <p>Googleing the errors has produced no useful ideas - any help appreciated.</p>
  
  <pre><code>&lt;?php
  $types = array('.pdf', '.doc', '.xls');
  if(0 &lt; count(array_intersect(array_map('strtolower', $filename, $types)))) {
     echo 'One';
  } else {
     echo 'Two';
  }
  ?&gt;
  </code></pre>
  
  <p>//update</p>
  
  <pre><code>&lt;?php
  $filename = array(get_post_meta(get_the_ID(), 'mjwlink-url'));
  $types = array('.pdf', '.doc', '.xls');
  if(0 &lt; count(array_intersect(array_map('strtolower', $filename), $types))) {
     echo 'One';
  } else {
     echo 'Two';
  }
  </code></pre>
  
  <p>?></p>