RSS Feed/News XF\Mvc\Entity\Manager::getFinder does not always return a Finder

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
33,772
Points
823

Reputation:

The XF\Mvc\Entity\Manager::getFinder function is type hinted to return a finder, but if an add-on does not implement the entity name as a short-string, this will fail and instead return the entity.

This will then give a misleading missing function message quite some distance from the root-cause.

Reproducer:

PHP:

Code:
namespace MyAddon\Entity;
class MyEntity extends \XF\Mvc\Entity\Entity
{
    public static function getStructure(Structure $structure): Structure
    {...

Read more

Continue reading...
 
Status
Not open for further replies.
Top