Skip to content
This repository
Browse code

Swap isset() for array_key_exists()

Fixes #3283
  • Loading branch information...
commit ea467e72d72e9eb7cd140816ee8d7abd900b2629 1 parent 3077595
Mark Story authored October 17, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/Cake/Controller/Controller.php
2  lib/Cake/Controller/Controller.php
@@ -796,7 +796,7 @@ public function redirect($url, $status = null, $exit = true) {
796 796
  * @return array Array with keys url, status and exit
797 797
  */
798 798
 	protected function _parseBeforeRedirect($response, $url, $status, $exit) {
799  
-		if (is_array($response) && isset($response[0])) {
  799
+		if (is_array($response) && array_key_exists(0, $response)) {
800 800
 			foreach ($response as $resp) {
801 801
 				if (is_array($resp) && isset($resp['url'])) {
802 802
 					extract($resp, EXTR_OVERWRITE);

3 notes on commit ea467e7

Scott Robertson

Just out of interest. Why?

ADmad
Collaborator

@Scottymeuk Read the associated ticket #3283

Mark Story
Owner

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

Please sign in to comment.
Something went wrong with that request. Please try again.