[Tue Nov 06 21:24:20.621004 2018] [php7:warn] [pid 17779] [client 10.0.1.232:54254] PHP Warning: in_array() expects parameter 2 to be array, integer given in /var/www/html/library/options.inc.php on line 4009, referer: http://10.0.1.227/interface/patient_file/encounter/encounter_top.php?set_encounter=248891
I am trying to clean up my error log.
We are using Ubuntu 18.x and PHP 7.2.
The error message above has popped up. I was looking into it and what not sure what I am looking at and I was hoping to get a second opinion on what I think I am reading in the code.
Whoever wrote the notes, I would like to say thank you for a hint at what is supposed to be happening in this function.
It seems that the JSON is reduced to a string (is that right).
The test variable holds the string that is what is being looked for (needle in the haystack).
However, because the $options is a string and not an array. PHP is throwing this error.
Would it be better to use strpos here instead of in_array since $options is not a real array?
@robert.down @brady.miller @sunsetsystems
$options = json_encode($t); // make it array.
This line is not really making it an array.