Browse Source

fixed issue

Stefan Dickmann 11 years ago
parent
commit
5d9410d770
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Controller/Component/CommonComponent.php

+ 5 - 1
Controller/Component/CommonComponent.php

@@ -449,7 +449,11 @@ class CommonComponent extends Component {
 		}
 		}
 
 
 		if (!$conditionalAutoRedirect || empty($this->Controller->autoRedirectActions) || is_array($referer) && !empty($referer['action'])) {
 		if (!$conditionalAutoRedirect || empty($this->Controller->autoRedirectActions) || is_array($referer) && !empty($referer['action'])) {
-			$refererController = Inflector::camelize($referer['controller']);
+			// Be sure that controller offset exists, otherwise you
+			// will run into problems, if you use url rewriting.
+			if (isset($referer['controller'])) {
+				$refererController = Inflector::camelize($referer['controller']);
+			}
 			// fixme
 			// fixme
 			if (!isset($this->Controller->autoRedirectActions)) {
 			if (!isset($this->Controller->autoRedirectActions)) {
 				$this->Controller->autoRedirectActions = array();
 				$this->Controller->autoRedirectActions = array();