KB Articles fails when there are no categories

Sheernox

New Member
Env: ClientExec 7.2.2 (ionCube), PHP 8.5.10, MariaDB 11.8.9

Where: modules/knowledgebase/models/KB_CategoryGateway.php line 331 (encoded)

Bug: With zero knowledge base categories, Admin > Knowledge Base > Articles fails.

Repro: Delete every KB category and article, then open Knowledge Base > Articles.

Error:
Code:
KB_CategoryGateway.php 331: count(): Argument #1 ($value) must be of type Countable|array, null given

Expected: An empty list. Probably count($x ?? []), or an [] default where the categories are loaded.
 
Back
Top