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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user