comanage-dev - Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors
Subject: COmanage Developers List
List archive
- From: Benn Oshrin <>
- To: Marie Huynh <>
- Cc: comanage-dev <>
- Subject: Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors
- Date: Tue, 21 Feb 2012 07:46:08 -0500
Both add() and edit() move things around into $data, which then gets passed to routines like checkWriteDependencies and saveAll.
The line you cite is a bit out of place, as a bit later we get
$data = $this->request->data;
I should clean that up.
Technically, you can write to $this->request, but I've been avoiding it to improve the design of the code (fewer functions that magically work by modifying things that weren't passed to it).
On 2/21/12 1:04 AM, Marie Huynh wrote:
In what situations then would it be advisable to do so? Which
intermediate data structures do you mean? I'm looking at things in
edit() in StandardController like
$this->request->data = $curdata;
On Mon, Feb 20, 2012 at 6:32 PM, Benn Oshrin
<
<mailto:>>
wrote:
In general, I don't think it's advisable to directly write to
$this->data or $this->request with Cake 2. A bunch of the code I
rewrote in StandardController avoids this by working with
intermediate data structures instead.
On 2/20/12 8:44 PM, Marie Huynh (JIRA) wrote:
[
https://bugs.internet2.edu/__jira/browse/CO-254?page=com.__atlassian.jira.plugin.system.__issuetabpanels:comment-__tabpanel&focusedCommentId=__16454#comment-16454
<https://bugs.internet2.edu/jira/browse/CO-254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454#comment-16454>
]
Marie Huynh commented on CO-254:
------------------------------__--
It is perhaps worth noting that modifying $this->request['data']
also logs a similar notice.
Indirect modification errors
----------------------------
Key: CO-254
URL:
https://bugs.internet2.edu/__jira/browse/CO-254
<https://bugs.internet2.edu/jira/browse/CO-254>
Project: COmanage
Issue Type: Sub-task
Components: Registry
Affects Versions: COmanage Registry 0.4 (Reshaped Cake)
Reporter: Marie Huynh
Assignee: Marie Huynh
Labels: sprint04
Fix For: COmanage Registry 0.4 (Reshaped Cake)
2012-02-20 02:16:50 Notice: Notice (8): Indirect
modification of overloaded element of CakeRequest has no
effect in
[/Applications/MAMP/htdocs/__gears/trunk/app/Controller/__CoNsfDemographicsController.__php,
line 141]
Trace:
CoNsfDemographicsController::__checkWriteDependencies() -
APP/Controller/__CoNsfDemographicsController.__php, line 141
StandardController::edit() -
APP/Controller/__StandardController.php, line 350
ReflectionMethod::invokeArgs() - [internal], line ??
Controller::invokeAction() -
CORE/Cake/Controller/__Controller.php, line 473
Dispatcher::_invoke() - CORE/Cake/Routing/Dispatcher.__php,
line 104
Dispatcher::dispatch() - CORE/Cake/Routing/Dispatcher.__php,
line 86
[main] - APP/webroot/index.php, line 96
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA
administrators:
https://bugs.internet2.edu/__jira/secure/__ContactAdministrators!default.__jspa
<https://bugs.internet2.edu/jira/secure/ContactAdministrators!default.jspa>
For more information on JIRA, see:
http://www.atlassian.com/__software/jira
<http://www.atlassian.com/software/jira>
- [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Benn Oshrin, 02/20/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Marie Huynh, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Benn Oshrin, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Benn Oshrin, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Marie Huynh, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Benn Oshrin, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Benn Oshrin, 02/21/2012
- Re: [comanage-dev] Re: [JIRA] (CO-254) Indirect modification errors, Marie Huynh, 02/21/2012
Archive powered by MHonArc 2.6.16.