title: how to solve " call_user_func() expects parameter 1 to be a valid callback "
body: <p>Hi my site wordpress if there is No attribute entered  &quot; call_user_func() expects parameter 1 to be a valid callback &quot; issue show in product page But if i chose attributes it is working fine , my code is :</p>
  <pre><code>&lt;?php
          if (!empty($tabs)) :
              $k_tab = $comboContent ? 1 : 0;
              foreach ($tabs as $key =&gt; $tab) :
                  ?&gt;
                  &lt;div class=&quot;nasa-panel entry-content&lt;?php echo ($k_tab == 0) ? ' active' : ''; ?&gt;&quot; id=&quot;nasa-tab-&lt;?php echo esc_attr($key); ?&gt;&quot;&gt;
                      &lt;?php if ($key == 'description' &amp;&amp; $specifi_desc): ?&gt;
                          &lt;div class=&quot;nasa-panel-block&quot;&gt;
                              &lt;?php  call_user_func($tab['callback'], $key, $tab); ?&gt;
                          &lt;/div&gt;
                          &lt;?php if (trim($specifications) != '') : ?&gt;
                              &lt;div class=&quot;nasa-panel-block nasa-content-specifications&quot;&gt;
                                  &lt;?php echo $specifications; ?&gt;
                              &lt;/div&gt;
                          &lt;?php endif; ?&gt;
                      &lt;?php
                      
                           
                     else:
                             call_user_func($tab['callback'], $key, $tab);
                     endif;
                      ?&gt;
                  &lt;/div&gt;
                  &lt;?php 
                  if ($key == 'description' &amp;&amp; (trim($specifications) != '') &amp;&amp; !$specifi_desc) : ?&gt;
                      &lt;div class=&quot;nasa-panel entry-content nasa-content-specifications&quot; id=&quot;nasa-tab-specifications&quot;&gt;
                          &lt;p&gt;&lt;?php echo $specifications; ?&gt;&lt;/p&gt;
                      &lt;/div&gt;
                  &lt;?php
                  endif;
                  $k_tab++;
              endforeach;
         
          endif;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/W2l5k.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W2l5k.jpg" alt="call_user_func() expects parameter 1 to be a valid callback" /></a></p>
  <p>could please help me</p>