title: array_values() expects parameter 1 to be array, null given
body: <p>Whats wrong in the array_values() function. </p>
  
  <p>I tried assigning the $updated_f to array(). </p>
  
  <p>I get Warning: array_values() expects parameter 1 to be array, null given</p>
  
  <pre><code>$this_params = array_merge_recursive($params, array('f' =&gt; array($filter['prefix'] =&gt; array($item['id'])))); 
  
  if (isset($this_params['f'])) {
      $updated_f = array(); 
     //Updated code
      if(isset($this_params['f']) &amp;&amp; is_array($this_params['f']) &amp;&amp; count($this_params['f']) &gt;0)
      {
        foreach($this_params['f'] as $f_key =&gt; $assoc_array) {
           $updated_f[$f_key] = array_values($assoc_array);   //Warning here
         } 
      }
      $this_params['f'] = $updated_f;
    }
  </code></pre>