Skip to content

Commit

Permalink
FIX Call defineMethods if lower method is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 21, 2024
1 parent ba97de9 commit 51abdd0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Core/CustomMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,14 @@ protected function getExtraMethodConfig($method)
}
// Lazy define methods
$lowerClass = strtolower(static::class);
if (!isset(self::class::$extra_methods[$lowerClass])) {
$lowerMethod = strtolower($method);
if (!array_key_exists($lowerClass, self::class::$extra_methods)
|| !array_key_exists($lowerMethod, self::class::$extra_methods[$lowerClass])
) {
$this->defineMethods();
}

return self::class::$extra_methods[$lowerClass][strtolower($method)] ?? null;
return self::class::$extra_methods[$lowerClass][$lowerMethod] ?? null;
}

/**
Expand Down

0 comments on commit 51abdd0

Please sign in to comment.