Bug Report #4013
Bug Report #4012: Arr::get should use array_key_exists instead of isset
Arr::get should use array_key_exists instead of isset
| Status: | Closed | Start date: | 05/23/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | v3.1.5 | |||
| Resolution: | duplicate | Points: |
Description
Currently Arr::get() relies on isset so it can't handle NULL values:
eg.
$test = array('foo' => 'foo' , 'bar' => NULL);
$test = Arr::get($test, 'bar', 'default');
Test is 'default' when it should be NULL. Fix is to use array_key_exists instead of isset.
History
Updated by Jeremy Bush 12 months ago
- Target version changed from v3.0.12 to v3.1.4
- Parent task set to #4012
Updated by Kevin D 12 months ago
Here is a pull request for this issue: https://github.com/kohana/core/pull/122
Updated by Matt Button 10 months ago
- Target version changed from v3.1.4 to v3.1.5
Updated by Kiall Mac Innes 5 months ago
- Status changed from New to Closed
- Resolution set to duplicate