Skip to content

Commit

Permalink
Swap isset() for array_key_exists()
Browse files Browse the repository at this point in the history
Fixes #3283
  • Loading branch information
markstory committed Oct 17, 2012
1 parent 3077595 commit ea467e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Controller.php
Expand Up @@ -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);
Expand Down

3 comments on commit ea467e7

@scottrobertson
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of interest. Why?

@ADmad
Copy link
Member

@ADmad ADmad commented on ea467e7 Dec 3, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Scottymeuk Read the associated ticket #3283

@markstory
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Please sign in to comment.