Handle empty inputs in Redis and database operations, improve safety seal validation, and enhance related tests

- Return empty arrays for empty inputs in Redis `mget`, `db_object_t`, and `users_o` operations.
- Refactor safety seal validation logic to handle numeric strings and improve clarity.
- Add unit and API tests to verify handling of empty inputs and numeric safety seal strings.
This commit is contained in:
Jeppe Bundgaard
2026-05-11 04:36:11 +02:00
parent 59a6297925
commit bea7e5697b
7 changed files with 112 additions and 10 deletions
+4
View File
@@ -1534,6 +1534,10 @@ class users_o extends db
{
global $db;
$customer_numbers = array_map('intval', $customer_numbers);
if (empty($customer_numbers)) {
return [];
}
// Look in the cache first
$customer_numbers_to_fetch = [];
$customer_names_cached = self::getCachedForMultipleObjects('economic_customer_name', $customer_numbers);