mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #1513 from dereuromark/2.4-return-early
2.4 return early
This commit is contained in:
commit
37cefe9f4f
4 changed files with 7 additions and 12 deletions
|
@ -538,9 +538,8 @@ class Cache {
|
||||||
}
|
}
|
||||||
if (isset(self::$_groups[$group])) {
|
if (isset(self::$_groups[$group])) {
|
||||||
return array($group => self::$_groups[$group]);
|
return array($group => self::$_groups[$group]);
|
||||||
} else {
|
|
||||||
throw new CacheException(__d('cake_dev', 'Invalid cache group %s', $group));
|
|
||||||
}
|
}
|
||||||
|
throw new CacheException(__d('cake_dev', 'Invalid cache group %s', $group));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,10 +235,9 @@ class SchemaShell extends AppShell {
|
||||||
if ($File->write($contents)) {
|
if ($File->write($contents)) {
|
||||||
$this->out(__d('cake_console', 'SQL dump file created in %s', $File->pwd()));
|
$this->out(__d('cake_console', 'SQL dump file created in %s', $File->pwd()));
|
||||||
return $this->_stop();
|
return $this->_stop();
|
||||||
} else {
|
|
||||||
$this->err(__d('cake_console', 'SQL dump could not be created'));
|
|
||||||
return $this->_stop();
|
|
||||||
}
|
}
|
||||||
|
$this->err(__d('cake_console', 'SQL dump could not be created'));
|
||||||
|
return $this->_stop();
|
||||||
}
|
}
|
||||||
$this->out($contents);
|
$this->out($contents);
|
||||||
return $contents;
|
return $contents;
|
||||||
|
|
|
@ -789,10 +789,9 @@ class TreeBehavior extends ModelBehavior {
|
||||||
if ($node[$right] == $node[$left] + 1) {
|
if ($node[$right] == $node[$left] + 1) {
|
||||||
if ($delete) {
|
if ($delete) {
|
||||||
return $Model->delete($id);
|
return $Model->delete($id);
|
||||||
} else {
|
|
||||||
$Model->id = $id;
|
|
||||||
return $Model->saveField($parent, null);
|
|
||||||
}
|
}
|
||||||
|
$Model->id = $id;
|
||||||
|
return $Model->saveField($parent, null);
|
||||||
} elseif ($node[$parent]) {
|
} elseif ($node[$parent]) {
|
||||||
list($parentNode) = array_values($Model->find('first', array(
|
list($parentNode) = array_values($Model->find('first', array(
|
||||||
'conditions' => array($scope, $Model->escapeField() => $node[$parent]),
|
'conditions' => array($scope, $Model->escapeField() => $node[$parent]),
|
||||||
|
|
|
@ -556,9 +556,8 @@ class HtmlHelper extends AppHelper {
|
||||||
|
|
||||||
if (empty($options['block'])) {
|
if (empty($options['block'])) {
|
||||||
return $out;
|
return $out;
|
||||||
} else {
|
|
||||||
$this->_View->append($options['block'], $out);
|
|
||||||
}
|
}
|
||||||
|
$this->_View->append($options['block'], $out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -593,9 +592,8 @@ class HtmlHelper extends AppHelper {
|
||||||
|
|
||||||
if (empty($options['block'])) {
|
if (empty($options['block'])) {
|
||||||
return $out;
|
return $out;
|
||||||
} else {
|
|
||||||
$this->_View->append($options['block'], $out);
|
|
||||||
}
|
}
|
||||||
|
$this->_View->append($options['block'], $out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue