Permalink
Browse files

Swap isset() for array_key_exists()

Fixes #3283
  • Loading branch information...
markstory committed Oct 17, 2012
1 parent 3077595 commit ea467e72d72e9eb7cd140816ee8d7abd900b2629
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Controller/Controller.php
@@ -796,7 +796,7 @@ public function redirect($url, $status = null, $exit = true) {
* @return array Array with keys url, status and exit
*/
protected function _parseBeforeRedirect($response, $url, $status, $exit) {
- if (is_array($response) && isset($response[0])) {
+ if (is_array($response) && array_key_exists(0, $response)) {
foreach ($response as $resp) {
if (is_array($resp) && isset($resp['url'])) {
extract($resp, EXTR_OVERWRITE);

3 comments on commit ea467e7

@scottrobertson

This comment has been minimized.

Show comment
Hide comment
@scottrobertson

scottrobertson Dec 3, 2012

Just out of interest. Why?

Just out of interest. Why?

@ADmad

This comment has been minimized.

Show comment
Hide comment
@ADmad

ADmad Dec 3, 2012

Member

@scottymeuk Read the associated ticket #3283

Member

ADmad replied Dec 3, 2012

@scottymeuk Read the associated ticket #3283

@markstory

This comment has been minimized.

Show comment
Hide comment
@markstory

markstory Dec 4, 2012

Member

I could have been clearer in the original commit message, my bad.

Member

markstory replied Dec 4, 2012

I could have been clearer in the original commit message, my bad.

Please sign in to comment.