Fixes #3424, Scaffold add no longer working, produces "Invalid Id" error message

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5832 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-10-21 17:37:25 +00:00
parent b2f8bf21f8
commit b584fe28c0
2 changed files with 2 additions and 2 deletions

View file

@ -256,7 +256,7 @@ class Scaffold extends Object {
}
if ($this->controller->_beforeScaffold($action)) {
if ($action == 'edit' && !isset($params['pass'][0]) || !$this->ScaffoldModel->exists()) {
if ($action == 'edit' && (!isset($params['pass'][0]) || !$this->ScaffoldModel->exists())) {
if (isset($this->controller->Session) && $this->controller->Session->valid != false) {
$this->controller->Session->setFlash(sprintf(__("Invalid id for %s::edit()", true), Inflector::humanize($this->modelKey)));
$this->controller->redirect($this->redirect);

View file

@ -482,4 +482,4 @@ class I18n extends Object {
return($domain);
}
}
?>
?>