#6357: requestAction with 2 dimensions array generates php notice from
array_combine
---------------------------+------------------------------------------------
    Reporter:  iwat        |          Type:  Bug               
      Status:  new         |      Priority:  High              
   Milestone:  1.2.x.x     |     Component:  Routing/Dispatcher
     Version:  1.2 Final   |      Severity:  Normal            
    Keywords:              |   Php_version:  n/a               
Cake_version:  1.2.3.8166  |  
---------------------------+------------------------------------------------
 '''Notice (8): Array to string conversion [CORE/cake/libs/router.php, line
 956]'''

 This message is displayed in any code which uses 2 dimensions array e.g.

 {{{
 // some_view.ctp

 <?php echo $this->requestAction(
   array(
     'controller' => 'Dummy',
     'action' => 'index',
     'parameters' => array('param1' => 123), // this line causes 'notice'
 message
   ),
   array('return'));
 ?>
 }}}

 Here is a stack trace:

 {{{
 array_combine - [internal], line ??
 Router::mapRouteElements() - CORE/cake/libs/router.php, line 956
 Router::url() - CORE/cake/libs/router.php, line 842
 Dispatcher::__extractParams() - CORE/cake/dispatcher.php, line 253
 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 112
 Object::requestAction() - CORE/cake/libs/object.php, line 100
 include - APP/views/pages/home.ctp, line 7
 View::_render() - CORE/cake/libs/view/view.php, line 662
 View::render() - CORE/cake/libs/view/view.php, line 376
 Controller::render() - CORE/cake/libs/controller/controller.php, line 799
 PagesController::display() -
 CORE/cake/libs/controller/pages_controller.php, line 82
 Object::dispatchMethod() - CORE/cake/libs/object.php, line 117
 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 227
 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 194
 [main] - APP/webroot/index.php, line 88
 }}}

 Sorry but I don't know how to write a test-case, hope this helps.

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6357>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to