mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-29 08:55:52 +03:00
[GH-ISSUE #6] search-function: $query is url encoded two times #6
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#6
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @steinm6 on GitHub (Jul 20, 2014).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/6
Hi,
The following call results in an empty list:
I think this is because the function _search_ in class _SpotifyWebAPI_ calls rawurlencode on the _$query_-variable ('Song 2' gets 'Song%202').
The static function _send_ of class _Request_ uses php-function _http_build_query_ which also urlencodes the given values ('Song%202' gets 'Song%25202').
I removed the rawurlencode in _search_ to avoid that. I am not sure if this is a bug in your lib or a problem with my environment / setup (I am using your lib as part of a Laravel4 project with php 5.5). 😄
@jwilsson commented on GitHub (Jul 24, 2014):
Hi,
I think you're absolutely right. Mind sending a pull request for it?
Let me just update the tests since they should have caught this.