Skip to content

Commit

Permalink
Minor simplification.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 25, 2013
1 parent 074fced commit f655e8a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/Cake/Utility/Hash.php
Expand Up @@ -250,12 +250,11 @@ public static function insert(array $data, $path, $values = null) {

foreach ($data as $k => $v) {
if (self::_matchToken($k, $token)) {
if ($conditions) {
if (self::_matches($v, $conditions)) {
$data[$k] = array_merge($v, $values);
continue;
}
} else {
if ($conditions && self::_matches($v, $conditions)) {
$data[$k] = array_merge($v, $values);
continue;
}
if (!$conditions) {
$data[$k] = self::insert($v, $nextPath, $values);
}
}
Expand Down

0 comments on commit f655e8a

Please sign in to comment.