[eluser]Phil Sturgeon[/eluser]
[quote author="joelkallman" date="1335287734"][quote author="Phil Sturgeon" date="1335283676"]As I have said please do not post random feature requests in the proposal thread, as it confuses the matter that we are talking about. Array returns are not being discussed here.[/quote]
It is not a random post or a feature request. If we are talking about expected behavior, let's be consistent. (That is what we are talking about, right?)[/quote]
Obviously. I am not surprised there are some methods I have not listed and I'm sure you've missed a few too. If this gets the go ahead I will painstakingly go through finding every single method in every single library. Obviously I am not going to half-arse it. These few provide enough of an example for us to talk things through.
[quote author="joelkallman" date="1335287734"]As far as returning an array...[/quote]
That is the part where you are going off track and randomly talking about arrays for some reason.
Right now the code looks like this:
Code:
protected function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
{
if ( ! isset($array[$index]))
{
return FALSE;
}
if ($xss_clean === TRUE)
{
return $this->security->xss_clean($array[$index]);
}
return $array[$index];
}
I plan to make it look like this:
Code:
protected function _fetch_from_array(&$array, $index = '', $xss_clean = FALSE)
{
if ( ! isset($array[$index]))
{
return NULL;
}
if ($xss_clean === TRUE)
{
return $this->security->xss_clean($array[$index]);
}
return $array[$index];
}
That one difference is pretty much the scope of this conversation and I would like to keep it to that.