fix PHP error: count(): Argument #1 ($value) must be of type Countable|array, null given

This commit is contained in:
ralf 2024-09-24 12:48:22 +02:00
parent f72dec6d52
commit cf24e9dbbe

View File

@ -169,7 +169,7 @@ class Storage
}
}
// if query returns exactly limit rows, we assume there are more and therefore set self::$limit_exceeded
self::$limit_exceeded = $offset !== false && count(is_array($id) ? $links : $links[$id]) == $limit;
self::$limit_exceeded = $offset !== false && $links && count(is_array($id) ? $links : ($links[$id]??[])) == $limit;
}
// catch Illegal mix of collations (ascii_general_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (1267)
// caused by non-ascii chars compared with ascii field uid