Skip to content

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

@MiloDBD

Description

@MiloDBD

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
d0afb95

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions