stricter nulls

This commit is contained in:
Shish
2023-06-27 17:45:35 +01:00
parent eca49bfc94
commit 8fb6fd5f54
18 changed files with 21 additions and 25 deletions

View File

@@ -12,12 +12,8 @@ class BulkActionBlockBuildingEvent extends Event
public array $actions = [];
public array $search_terms = [];
public function add_action(String $action, string $button_text, string $access_key = null, String $confirmation_message = "", String $block = "", int $position = 40)
public function add_action(String $action, string $button_text, string $access_key = null, string $confirmation_message = "", string $block = "", int $position = 40)
{
if ($block == null) {
$block = "";
}
if (!empty($access_key)) {
assert(strlen($access_key)==1);
foreach ($this->actions as $existing) {
@@ -180,7 +176,7 @@ class BulkActions extends Extension
}
} elseif (isset($_POST['bulk_query']) && $_POST['bulk_query'] != "") {
$query = $_POST['bulk_query'];
if ($query != null && $query != "") {
if (!empty($query)) {
$items = $this->yield_search_results($query);
}
} else {