mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Update conditional logic when checking array keys before removing methods in CustomMethods
This commit is contained in:
parent
52a039f631
commit
1a2dbfd3a5
@ -288,8 +288,8 @@ trait CustomMethods
|
||||
if (
|
||||
// always check for property
|
||||
(isset($methodInfo['property']) && $methodInfo['property'] === $property) &&
|
||||
// check for index only if provided (otherwise assume true)
|
||||
(($index && isset($methodInfo['index']) && $methodInfo['index'] === $index) || true)
|
||||
// check for index only if provided
|
||||
(!$index || ($index && isset($methodInfo['index']) && $methodInfo['index'] === $index))
|
||||
) {
|
||||
unset(self::$extra_methods[$class][$method]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user