Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

updating comments for HTTPRequest - immutability #2923

Merged
merged 1 commit into from Mar 15, 2014

Conversation

Projects
None yet
2 participants
Contributor

IgorNadj commented Mar 5, 2014

SS_HTTPRequest can be read like an array, e.g. echo $request['a'], but cannot be written like an array, e.g. $request['a'] = 5; Added comment to caution people.

See line 375:

/**
 * @ignore
 */
public function offsetSet($offset, $value) {}

/**
 * @ignore
 */
public function offsetUnset($offset) {}

Might be good to write something about how you are supposed to modify a request, or what you are supposed to do instead (a redirect?).

@IgorNadj IgorNadj updating comments for HTTPRequest - immutability
SS_HTTPRequest can be read like an array, e.g. echo $request['a'], but cannot be written like an array, e.g. $request['a'] = 5; Added comment to caution people.

See line 375:
==================================================================
	/**
	 * @ignore
	 */
	public function offsetSet($offset, $value) {}
	
	/**
	 * @ignore
	 */
	public function offsetUnset($offset) {}
==================================================================

Might be good to write something about how you are supposed to modify a request, or what you are supposed to do instead (a redirect?).
7f39fb5

@simonwelsh simonwelsh added a commit that referenced this pull request Mar 15, 2014

@simonwelsh simonwelsh Merge pull request #2923 from IgorNadj/patch-1
updating comments for HTTPRequest - immutability
6e7195b

@simonwelsh simonwelsh merged commit 6e7195b into silverstripe:3.1 Mar 15, 2014

1 check passed

default Scrutinizer: No new issues — Travis: Passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment