AdminActionService::execute should support upper case action string
mschop opened this issue · comments
Calling the AdminActionService's action
method with $method
= 'POST' causes throwing \InvalidArgumentException
(new AdminActionService(...))->execute('POST', ...);
The allow list check should be made case insensitive.
Instead of:
if (!in_array($method, ['get', 'post', 'put', 'patch', 'delete'])) {
This:
if (!in_array(strtolower($method), ['get', 'post', 'put', 'patch', 'delete'])) {