Bug #45405

Uncaught Exception in DynamicRoutePart

Added by Marco Falkenberg almost 9 years ago. Updated over 7 years ago.

Status:
Accepted
Priority:
Should have
Category:
MVC - Routing
Target version:
-
Start date:
2013-02-12
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.4
Has patch:
No
Complexity:

Description

In line 184 of the DynamicRoutePart a notice is thrown if the incoming value is an array. This happens for PHP Versions > 5.4.0 (see http://php.net/ChangeLog-5.php).


Files

uriFor.png (128 KB) uriFor.png Adrian Föder, 2014-03-05 11:19
#1

Updated by Bastian Waidelich almost 9 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Bastian Waidelich

Hi Marco, thanks for reporting!
Can you please add more details on when you get this issue?
The value should never be an array in the first place I think – when does this happen?

#2

Updated by Marco Falkenberg over 8 years ago

Sorry, i cannot replicate this error anymore. Maybe due to the recent changes in Flow.
I guess this happens when having a named route part, whose name is also found in the request body arguments which then could be an array.

#3

Updated by Bastian Waidelich over 8 years ago

  • Status changed from Needs Feedback to Closed

Marco Falkenberg wrote:

Sorry, i cannot replicate this error anymore. Maybe due to the recent changes in Flow.

No problem, thanks for reporting back!
I close this issue for now – feel free to re-open if the exception occurs again

#4

Updated by Adrian Föder over 7 years ago

Luckily I found this one, just happenened to me. It seems to occur if I

  1. invoke a URI like example.org/acme.stuff/plan/show?plan[__identity=abcde-123456]
  2. ...this is secured and I am redirected to the WebEntryPoint
  3. ...and I successfully authenticate and "it" tries to redirect me to the initial URI.

Take the attached stack trace screen shot into account; and,

Uncaught exception #1: Warning: urlencode() expects parameter 1 to be string, array given in C:\Users\afoeder\PhpstormProjects\acme\Distribution\Data\Temporary\Development\Cache\Code\Flow_Object_Classes\TYPO3_Flow_Mvc_Routing_DynamicRoutePart.php line 184

51 TYPO3\Flow\Error\ErrorHandler::handleError(2, "urlencode() expects parameter 1 to be string, array given", "C:\Users\afoeder\PhpstormProjects\acme\Distribution\Data\Temporary\Development\Cache\Code\Flow_Object_Classes\TYPO3_Flow_Mvc_Routing_DynamicRoutePart.php", 184, array|1|)
50 urlencode(array|1|)
49 TYPO3\Flow\Mvc\Routing\DynamicRoutePart_Original::resolveValue(array|1|)
                                                                       / \
              ---------------------------------------------------------   -------------------
             /                                                                               \
               array(1)
               string "__identity" (10) => string "40329e63-3984-c80b-13eb-5e0c4e59e7fc" (36)

48 TYPO3\Flow\Mvc\Routing\DynamicRoutePart_Original::resolve(array|5|)
47 TYPO3\Flow\Mvc\Routing\Route_Original::resolves(array|5|)
46 TYPO3\Flow\Mvc\Routing\Router_Original::resolve(array|5|)
45 TYPO3\Flow\Mvc\Routing\UriBuilder_Original::build(array|5|)
                                                          / \
     -----------------------------------------------------   -------------------------
    /                                                                                  \
      array(5)
      string "plan" (4) => array(1)
         string "__identity" (10) => string "40329e63-3984-c80b-13eb-5e0c4e59e7fc" (36)
      string "@action" (7) => string "pickplan" (8)
      string "@controller" (11) => string "plangeneration" (14)
      string "@package" (8) => string "acme.core" (14)
      string "@format" (7) => string "html" (4)

44 TYPO3\Flow\Mvc\Routing\UriBuilder_Original::uriFor("pickPlan", array|1|, "PlanGeneration", "Acme.Core", NULL)
43 TYPO3\Flow\Mvc\Routing\UriBuilder::uriFor("pickPlan", array|1|, "PlanGeneration", "Acme.Core", NULL)
                                                              / \
                     -----------------------------------------   --------------------------------------
                    /                                                                                  \
                      array(1)
                      string "plan" (4) => array(1)
                         string "__identity" (10) => string "40329e63-3984-c80b-13eb-5e0c4e59e7fc" (36)

42 call_user_func_array(array|2|, array|5|)
41 TYPO3\Flow\Mvc\Routing\UriBuilder::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
40 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
39 TYPO3\Neos\Aspects\PluginUriAspect_Original::rewritePluginViewUris(TYPO3\Flow\Aop\JoinPoint)
38 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
37 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
36 TYPO3\Flow\Mvc\Routing\UriBuilder::uriFor("pickPlan", array|1|, "PlanGeneration", "Acme.Core", NULL)
35 TYPO3\Flow\Mvc\Controller\AbstractController::redirect("pickPlan", "PlanGeneration", "Acme.Core", array|1|, 0, 303, "html")
34 TYPO3\Flow\Mvc\Controller\AbstractController::redirectToRequest(TYPO3\Flow\Mvc\ActionRequest)
33 Acme\Core\Controller\AuthenticationController_Original::onAuthenticationSuccess(TYPO3\Flow\Mvc\ActionRequest)
32 TYPO3\Flow\Security\Authentication\Controller\AbstractAuthenticationController_Original::authenticateAction()
31 TYPO3\Flow\Security\Authentication\Controller\AbstractAuthenticationController::authenticateAction()
30 call_user_func_array(array|2|, array|0|)
29 TYPO3\Flow\Security\Authentication\Controller\AbstractAuthenticationController::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
28 Acme\Core\Controller\AuthenticationController::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
27 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
26 TYPO3\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(TYPO3\Flow\Aop\JoinPoint)
25 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
24 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
23 TYPO3\Flow\Security\Authentication\Controller\AbstractAuthenticationController::authenticateAction()
22 Acme\Core\Controller\AuthenticationController::authenticateAction()
21 call_user_func_array(array|2|, array|0|)
20 Acme\Core\Controller\AuthenticationController::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
19 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
18 TYPO3\Flow\Security\Aspect\PolicyEnforcementAspect_Original::enforcePolicy(TYPO3\Flow\Aop\JoinPoint)
17 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
16 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
15 Acme\Core\Controller\AuthenticationController::authenticateAction()
14 call_user_func_array(array|2|, array|0|)
13 TYPO3\Flow\Mvc\Controller\ActionController_Original::callActionMethod()
12 TYPO3\Flow\Mvc\Controller\ActionController_Original::processRequest(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
11 TYPO3\Flow\Mvc\Dispatcher_Original::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
10 TYPO3\Flow\Mvc\Dispatcher::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
9 call_user_func_array(array|2|, array|2|)
8 TYPO3\Flow\Mvc\Dispatcher::Flow_Aop_Proxy_invokeJoinPoint(TYPO3\Flow\Aop\JoinPoint)
7 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
6 TYPO3\Flow\Security\Aspect\RequestDispatchingAspect_Original::blockIllegalRequestsAndForwardToAuthenticationEntryPoints(TYPO3\Flow\Aop\JoinPoint)
5 TYPO3\Flow\Aop\Advice\AroundAdvice::invoke(TYPO3\Flow\Aop\JoinPoint)
4 TYPO3\Flow\Aop\Advice\AdviceChain::proceed(TYPO3\Flow\Aop\JoinPoint)
3 TYPO3\Flow\Mvc\Dispatcher::dispatch(TYPO3\Flow\Mvc\ActionRequest, TYPO3\Flow\Http\Response)
2 TYPO3\Flow\Http\RequestHandler::handleRequest()
1 TYPO3\Flow\Core\Bootstrap::run()

HTTP REQUEST:
POST /app/authentication/authenticate HTTP/1.1
Content-Length: 950
Content-Type: application/x-www-form-urlencoded
Connection: keep-alive
Referer: http://dev.internal.acme.com/app/authentication/login
Accept-Encoding: gzip, deflate
Accept-Language: de,en-us;q=0.7,en;q=0.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Host: dev.internal.acme.com

__referrer%5B%40package%5D=Acme.Core&__referrer%5B%40subpackage%5D=&__referrer%5B%40controller%5D=Authentication&__referrer%5B%40action%5D=login&__referrer%5Barguments%5D=YTowOnt95df6766b3c5056d6b108e8973d7d15e58e74af49&__trustedP[......]

HTTP RESPONSE:
[response was empty]

Hope that helps!

Also available in: Atom PDF