- Affected version
- 2.0.2
In most cases, XenForo's entity system treats a string as if it was an array with 1 entry. But the primaryKey appears somewhat special.
This works.
This will cause unexpected errors when you pass an integer to whereId or whereIds function;
This works.
PHP:
$structure->primaryKey = 'monitor_id';
Code:
$structure->primaryKey = ['monitor_id'];
ErrorException: [E_WARNING] array_key_exists() expects parameter 2 to be array, integer given in src/XF/Mvc/Entity/Finder.php at line 433