diff --git a/src/Core/CustomMethods.php b/src/Core/CustomMethods.php index a0e20e517..8225fcc3b 100644 --- a/src/Core/CustomMethods.php +++ b/src/Core/CustomMethods.php @@ -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]); }