Permalink
Browse files

Swap isset() for array_key_exists()

Fixes #3283
  • Loading branch information...
1 parent 3077595 commit ea467e72d72e9eb7cd140816ee8d7abd900b2629 @markstory markstory committed Oct 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Controller/Controller.php
View
2 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

Just out of interest. Why?

@ADmad
CakePHP member

@Scottymeuk Read the associated ticket #3283

@markstory
CakePHP member

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

Please sign in to comment.