Fix "TypeError: strlen() expects parameter 1 to be string, null given"

Found on writing tests, should not happen

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-07-19 20:49:12 +02:00
parent dce146f596
commit 4d7890d1f6
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -210,7 +210,7 @@ class NavigationTree
{
$retval = 0;
if (strlen($GLOBALS['db']) == 0) {
if (strlen($GLOBALS['db'] ?? '') === 0) {
return $retval;
}