[BUGFIX] CLI argument handling chokes on = use
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Classes / MVC / CLI / RequestBuilder.php
index 6289ba3..6adc257 100644 (file)
@@ -80,7 +80,7 @@ class Tx_Extbase_MVC_CLI_RequestBuilder {
         * @return Tx_Extbase_MVC_CLI_Request The CLI request as an object
         * @author Robert Lemke <robert@typo3.org>
         */
-       public function build($commandLine) {
+       public function build($commandLine = '') {
                $request = $this->objectManager->get('Tx_Extbase_MVC_CLI_Request');
                $request->setControllerObjectName('Tx_Extbase_Command_HelpCommandController');
 
@@ -208,7 +208,7 @@ class Tx_Extbase_MVC_CLI_RequestBuilder {
         * @author Robert Lemke <robert@typo3.org>
         */
        protected function getValueOfCurrentCommandLineOption($currentArgument, array &$rawCommandLineArguments, $expectedArgumentType) {
-               if (!isset($rawCommandLineArguments[0]) || (isset($rawCommandLineArguments[0]) && $rawCommandLineArguments[0][0] === '-' && (strpos($currentArgument, '=') === FALSE))) {
+               if ((!isset($rawCommandLineArguments[0]) && (strpos($currentArgument, '=') === FALSE)) || (isset($rawCommandLineArguments[0]) && $rawCommandLineArguments[0][0] === '-' && (strpos($currentArgument, '=') === FALSE))) {
                        return TRUE;
                }