浏览代码

fixed issue

Stefan Dickmann 11 年之前
父节点
当前提交
5d9410d770
共有 1 个文件被更改,包括 5 次插入1 次删除
  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'])) {
-			$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
 			if (!isset($this->Controller->autoRedirectActions)) {
 				$this->Controller->autoRedirectActions = array();