#5885: $this->render() returns concatenated data
--------------------------+-------------------------------------------------
Reporter: sethdavis | Type: Bug
Status: new | Priority: Medium
Milestone: 1.2.x.x | Component: Controller
Version: RC3 | Severity: Normal
Keywords: render | Php_version: PHP 5
Cake_version: |
--------------------------+-------------------------------------------------
I'm encountering a strange issue which I believe is a bug, but perhaps I'm
misunderstanding how $this->render() is supposed to work in a controller.
[[BR]]
[[BR]]
In one of my controllers I need to save the output of $this->render() to a
variable. This works fine until you start saving renders in a loop.
[[BR]]
[[BR]]
The problem lies in (or around, depending on your revision) line 733 of
controller.php:
{{{
$this->output .= $View->render($action, $layout, $file);
}}}
It is concatenating the return value for render(), and thus every time I
assign my render in a loop, the previous loop's data is there as well.
[[BR]]
[[BR]]
Please see the google-group post for reference:
http://groups.google.com/group/cake-
php/browse_thread/thread/0f7f1fba33e4321f
[[BR]]
[[BR]]
Thanks,
Seth
--
Ticket URL: <https://trac.cakephp.org/ticket/5885>
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
-~----------~----~----~----~------~----~------~--~---