RSS Feed/News XF\Extension::removeClassExtensions doesn't check existence

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
23,644
Points
823

Reputation:

In XF\Extension::removeClassExtensions, we have:
Code:

Code:
foreach ($this->classExtensions[$class] AS $subclass)
{
   unset($this->inverseExtensionMap[$subclass]);
}
However, this does not check that the key $this->classExtensions[$class] exists before looping it, which throws an invalid key error and a foreach error. Since XF\Extension also provides no getter for $this->classExtensions, there is no easy way for an add-on to know whether this key exists if they need to call...

Read more

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