Skip to content

Cannot use query params because of bad syntax "+=" in JwplatformClient::request(). Should be ".=" #41

@Nicolas-Bouteille

Description

@Nicolas-Bouteille

Hi,

I've been scratching my head around for almost 3 hours trying to figure out how to make use for query params when Listing Media (https://docs.jwplayer.com/platform/reference/get_v2-sites-site-id-media)

Here is the code I was trying out, but that would return false…

$jwplatform_client->Media->list($property, ['page_length' => 2]);

After Xdebugging, I think I finally found that a bad syntax is causing this not to work…

In JwplatformClient::request() line 91
$path += "?" . http_build_query($query_params);
should be :
$path .= "?" . http_build_query($query_params);

PHP syntax instead of Javascript…

As of now, instead of appending the query params, the $path variable is just converted as an int 0 which breaks the request.

Do you think it could be possible to release a new version with this modified any time soon?

Thank you very much :)

Nicolas

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