Bug Report #3194
arr::path error if value of wildcard array is not an array
| Status: | Closed | Start date: | 08/20/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | Core | |||
| Target version: | v3.0.9 | |||
| Resolution: | fixed | Points: |
Description
$test = array(
'a'=>
array(
'b'=>array('c'=>1),
'd'=>2,
)
);
Kohana::debug(path($post,'a.*.c'));
This will result in an "array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object" error message.
Related issues
Associated revisions
Use Arr::is_array in Arr::path rather than in_array and return $default when $array is not an array, fixes #3194
History
Updated by David Duymelinck almost 3 years ago
The array name in the function call needs to be changed to $test to make the example work.
Updated by Woody Gilk over 2 years ago
- Category set to Core
- Assignee set to Woody Gilk
- Target version set to v3.0.8
Updated by Woody Gilk over 2 years ago
- Target version changed from v3.0.8 to v3.0.9
Updated by Woody Gilk over 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Resolution set to fixed