Hiding a Tab when the View from Field View is Empty
Try with this 

$node = node_load($argument);
if ((isset($node-&gt;field_fotos) || 
     isset($node-&gt;field_summary)) &amp;&amp;
     (is_array($node-&gt;field_fotos) &amp;&amp;
     count($node-&gt;field_fotos) &gt; 0) ||
     (is_array($node-&gt;field_summary) &amp;&amp; 
     count($node-&gt;field_summary) &gt; 0)) {
  return TRUE;
}
else {
  return FALSE;
}