Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined offset: 1 error while launching? #179

Closed
makandz opened this issue Dec 25, 2019 · 1 comment
Closed

Undefined offset: 1 error while launching? #179

makandz opened this issue Dec 25, 2019 · 1 comment

Comments

@makandz
Copy link

makandz commented Dec 25, 2019

I just setup the latest version of this API using composer on my CentOS System running PHP 7.2. It works fine on my Windows machine but my Linux machine posts the following errors when I try loading any page with the autoload required.

Notice: Undefined offset: 1 in /var/www/html/vendor/jwilsson/spotify-web-api-php/src/Request.php on line 237

Fatal error: Uncaught SpotifyWebAPI\SpotifyWebAPIException: An unknown error occurred. in /var/www/html/vendor/jwilsson/spotify-web-api-php/src/Request.php:57 Stack trace: #0 /var/www/html/vendor/jwilsson/spotify-web-api-php/src/Request.php(254): SpotifyWebAPI\Request->parseBody(NULL, 0) #1 /var/www/html/vendor/jwilsson/spotify-web-api-php/src/Request.php(104): SpotifyWebAPI\Request->send('POST', 'https://account...', 'grant_type=clie...', Array) ....

Any help?

Update: Doing some more investigation it looks like my curl_exec is returning with a false Boolean value.

@makandz
Copy link
Author

makandz commented Dec 25, 2019

Managed to fix it, SELinux for some reason was preventing my curl requests from going out. Solved 👍

@makandz makandz closed this as completed Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant