EArray icon indicating copy to clipboard operation
EArray copied to clipboard

Bug on recursive get value

Open heroselohim opened this issue 10 years ago • 1 comments

Here I'm posting a fix when using custom delimiters. I'm using dot as delimiter. By the way, this class is awesome! Thanks

public function get($key, $default = null, $delimiter = null)
{
    if ($delimiter === null) {     <-----------
        $delimiter = $this->delimiter;      <-----------
    }       <-----------

    $ret = $this->getRawValue($key, $default, $delimiter);
    if (is_array($ret)) {
        $ret = new EArray($ret, $delimiter);     <----------
    }

    return $ret;
}

Sorry, formatting of text is not working for me.

heroselohim avatar Aug 23 '16 18:08 heroselohim

@heroselohim Thanks your report and suggestion. I fixed the code by #7. and released new version v2.3.0.

kohkimakimoto avatar Aug 24 '16 06:08 kohkimakimoto