kohana/core — pull request #330 by hkdobrev (2013-02-05 14:04:17+00:00)
Title: Arr::get work with ArrayAccess and NULL values

This is my take on new `Arr::get()` based on the discussions on #301 and #299 and the many issues related to them.

---

Passing `NULL` as first argument would return the default.

Passing something else than `array` or instance of `ArrayAccess` would throw an exception.

Using `isset()` for performance reasons.

Using `array_key_exists()` for arrays and `ArrayAccess::offsetExists()` otherwise.

---

This change might throw an exception which was not discussed before. Please let me know if you disagree with that.