Skip to content

Commit

Permalink
Fix PHP 8 error: "array_search(): Argument #2 ($haystack) must be of …
Browse files Browse the repository at this point in the history
…type array, null given"
  • Loading branch information
nathangray committed Oct 14, 2021
1 parent 9de404d commit 506a9bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion importexport/inc/class.importexport_definitions_bo.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ public function delete($keys) {
$definition = $this->read($key);
if($definition['owner'] && $definition['owner'] == $GLOBALS['egw_info']['user']['account_id'] || $GLOBALS['egw_info']['user']['apps']['admin']) {
// clear private cache
unset($this->definitions[array_search($key,$this->definitions)]);
if(is_array($this->definitions))
{
unset($this->definitions[array_search($key, $this->definitions)]);
}
} else {
unset($keys[$index]);
}
Expand Down

0 comments on commit 506a9bb

Please sign in to comment.