php-api-wrapper icon indicating copy to clipboard operation
php-api-wrapper copied to clipboard

array_merge() expects at least 1 parameter, 0 given ($this->scopes is null)

Open MiloDBD opened this issue 2 years ago • 0 comments

I'm doing a very basic "Transport" (not the basic one) Transport implementation, and I'm seeing $this->scopes is null on a basic GET request...

(src/Builder.php)

public function getQuery()
    {
        return array_merge(
            array_merge(...array_values($this->scopes)),
            $this->query
        );
    }

This got changes here. https://github.com/CristalTeam/php-api-wrapper/blob/4de7a802f3df14155947b94b3fb0c415739b0e30/src/Builder.php#L33C5-L39C6

On this commit https://github.com/CristalTeam/php-api-wrapper/commit/d0afb958f17c4b91109633ec4c432ff6dab07537

If I revert the change to this.

    public function getQuery()
    {
        /*return array_merge(
            array_merge(...array_values($this->scopes)),
            $this->query
        );*/
        return $this->query;
    }

It seems to work.

I could be not implementing this correctly.

Any advice?

Thank you, good work here... appreciated.

MiloDBD avatar Sep 19 '23 07:09 MiloDBD