Project

General

Profile

Actions

Bug #71585

closed

Wrong condition at resolving of controller action name

Added by Benjamin Wenzel over 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-11-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

It seems for me like the name of a controller Action written in lowerCamelCase like "SomeSuperDesignedAction" will not be resolved, because of the check in this function.

If the controller action is called without arguments, there's no problem. Otherwise the method argument validation can not be mapped.

I think the it should be if ($controllerObjectName !== '' && $this->controllerActionName !== strtolower($this->controllerActionName)){...}

/**
     * Returns the name of the action the controller is supposed to execute.
     *
     * @return string Action name
     * @api
     */
    public function getControllerActionName() {
        $controllerObjectName = $this->getControllerObjectName();
        if ($controllerObjectName !== '' && $this->controllerActionName === strtolower($this->controllerActionName)) {
            $actionMethodName = $this->controllerActionName . 'Action';
            $classMethods = get_class_methods($controllerObjectName);
            if (is_array($classMethods)) {
                foreach ($classMethods as $existingMethodName) {
                    if (strtolower($existingMethodName) === strtolower($actionMethodName)) {
                        $this->controllerActionName = substr($existingMethodName, 0, -6);
                        break;
                    }
                }
            }
        }
        return $this->controllerActionName;
    }


Files

typo3.png (64.1 KB) typo3.png Benjamin Wenzel, 2015-11-16 00:18
Actions #1

Updated by Wouter Wolters almost 8 years ago

  • Status changed from New to Needs Feedback

The code you mention is already in place. Is this still an issue?

Actions #2

Updated by Wouter Wolters almost 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions

Also available in: Atom PDF