mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 10:32:40 +00:00
Merge branch '1.2' into 1.2-merger
Conflicts: app/webroot/test.php cake/VERSION.txt cake/bootstrap.php cake/config/config.php cake/console/cake.php cake/console/libs/schema.php cake/console/templates/skel/webroot/test.php cake/libs/configure.php cake/tests/cases/console/libs/schema.test.php cake/tests/cases/libs/debugger.test.php cake/tests/cases/libs/model/model_write.test.php cake/tests/fixtures/aco_fixture.php
This commit is contained in:
commit
5717e3b59c
32 changed files with 555 additions and 142 deletions
|
@ -398,7 +398,7 @@ class Set extends Object {
|
|||
$options = array_merge(array('flatten' => true), $options);
|
||||
if (!isset($contexts[0])) {
|
||||
$current = current($data);
|
||||
if ((is_array($current) && count($data) <= 1) || !is_array($current)) {
|
||||
if ((is_array($current) && count($data) <= 1) || !is_array($current) || !Set::numeric(array_keys($data))) {
|
||||
$contexts = array($data);
|
||||
}
|
||||
}
|
||||
|
@ -1098,7 +1098,7 @@ class Set extends Object {
|
|||
if (!is_null($key)) {
|
||||
$id = $key;
|
||||
}
|
||||
if (is_array($r)) {
|
||||
if (is_array($r) && count($r)) {
|
||||
$stack = array_merge($stack, Set::__flatten($r, $id));
|
||||
} else {
|
||||
$stack[] = array('id' => $id, 'value' => $r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue