- Issue created by @danrod
- Merge request !6fix: Avoid deprecated automatic conversion of false to array in apachesolr_has_searched function → (Open) created by yuvania
I got into this PHP deprecation notice when running a D7 on a new instance with PHP 8.2 installed:
Deprecated function: Automatic conversion of false to array is deprecated in apachesolr_has_searched() (line 1101 /apachesolr/apachesolr.module)
At line 1101, check if $searched is FALSE, if so, caste to ARRAY or assign []
to it:
function apachesolr_has_searched($env_id, $searched = NULL) {
$_searched = &drupal_static(__FUNCTION__, FALSE);
if (is_bool($searched)) {
$_searched[$env_id] = ($searched == FALSE) ? [] : $searched;
}
....
Active
1.0
Code