A PHP Error was encountered
Severity: Warning
Message:
in_array()expects parameter 2 to be array, boolean givenFilename: models/main_model.php
Line Number: 1386
and line number 1386 is :
$pcode_id=$this->get_postcode_id($value);
$myarr=unserialize($in_search);
if(in_array($pcode_id,$myarr)) // line 1386
{
return $myarr;
}
else
{
return false;
}
The result still shows but the error appears.
Apparently $myarr is not an array at some point… you could var_dump($myarr); and run your code and see at what point it is not an array.
But you should check first if $myarr is an array before trying in_array.