Project

General

Profile

Actions

Bug #72212

closed

getIncludeScriptByCommandLineKey() PHPdoc wrong - returns Array not string

Added by Henri Nathanson almost 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-12-14
Due date:
% Done:

100%

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

Description

The PHPdoc is wrong - in class TYPO3\CMS\Backend\Console\CliRequestHandler
I searched for a category "CLI", but there isn't any.

    /**
     * Define cli-related parameters and return the include script as well as the command line name. Used for
     * authentication against the backend user in the "laodCommandLineBackendUser()" action.
     *
     * @param string $cliKey the CLI key
     * @return string the absolute path to the include script
     */
    protected function getIncludeScriptByCommandLineKey($cliKey)
    {
        list($commandLineScript, $commandLineName) = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys'][$cliKey];
        if (!is_callable($commandLineScript)) {
            $commandLineScript = GeneralUtility::getFileAbsFileName($commandLineScript);
            // Note: These constants are not in use anymore, and marked for deprecation and will be removed in TYPO3 CMS 8
            define('TYPO3_cliKey', $cliKey);
            define('TYPO3_cliInclude', $commandLineScript);
        }
        // This is a compatibility layer: Some cli scripts rely on this, like ext:phpunit cli
        // This layer will be removed in TYPO3 CMS 8
        $GLOBALS['temp_cliScriptPath'] = array_shift($_SERVER['argv']);
        $GLOBALS['temp_cliKey'] = array_shift($_SERVER['argv']);
        array_unshift($_SERVER['argv'], $GLOBALS['temp_cliScriptPath']);
        return array($commandLineScript, $commandLineName);
    }
Actions

Also available in: Atom PDF