officialfm/officialfm-php — Issue #6: Upload track bugs
Author: sebdesign
Created: 2011-12-01 22:56:45+00:00
State: open

I'm not sure if this is a bug or something I don't get.

First, the `$playlist_id` argument in the `upload()` method is useless, because it's not used in the method body.

When I use `upload()`, I get this warning:

```php
A PHP Error was encountered

Severity: Warning

Message: mysql_connect() [function.mysql-connect]: Access denied for user 'nobody'@'localhost' (using password: NO)

Filename: store/OAuthStoreSQL.php

Line Number: 87
```

After investigating the oauth-php library, that happends because the default OAuthStore method is MySQL.
To override this, I initialize the OAuthStore instace before, and I set it to 'Session', with all the params like the credentials.php on the sign-in-with-officialfm-php repo.

I still get an other error:

```php
A PHP Error was encountered

Severity: Warning

Message: hash_hmac() expects parameter 2 to be string, array given

Filename: signature_method/OAuthSignatureMethod_HMAC_SHA1.php

Line Number: 60
```

It seems oauth-php doesn't like the `$files` array passed as `$body` in the OAuthRequester.
`$body` should be a string, not an array. Also, maybe `$files` should be passed as the `$files` argument in the OAuthRequester, instead of `$body`? I'm not sure what else to try...