{"issue":{"created_at":"2011-12-08T18:14:52Z","state":"open","updated_at":"2011-12-08T18:14:52Z","comments":0,"user":{"gravatar_id":"7d5b50d1dd86691b36aa96d8a2626b28","id":667144,"url":"https://api.github.com/users/sebdesign","avatar_url":"https://secure.gravatar.com/avatar/7d5b50d1dd86691b36aa96d8a2626b28?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"sebdesign"},"body":"I was trying to upload a video wich had a single quote in the filename.\r\nAs a result I received a `DailymotionTransportException` saying *Missing required parameter: url*.\r\n\r\nWhen `$this->uploadFile($filePath)` calls `$this->call('file.upload')` on [line 187](https://github.com/dailymotion/dailymotion-sdk-php/blob/master/Dailymotion.php#L187) the `$result` is a JSON string wich has a `name` property. Its value is the filename but the quote is escaped with a single slash.\r\n\r\nOn [line 190](https://github.com/dailymotion/dailymotion-sdk-php/blob/master/Dailymotion.php#L190) `json_decode()` returns `NULL`. The quote needs to be unescaped, or escape the flash (double-escape the quote).\r\n\r\nHere is a working version:\r\n\r\n```php\r\n$result = json_decode(str_replace('\\\\', '\\\\\\\\', $this->httpRequest($result['upload_url'], array('file' => '@' . $filePath))), true);\r\n```","assignee":null,"id":2491221,"number":5,"labels":[],"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"Error uploading file with quotes","html_url":"https://github.com/dailymotion/dailymotion-sdk-php/issues/5","closed_at":null,"url":"https://api.github.com/repos/dailymotion/dailymotion-sdk-php/issues/5","milestone":null},"action":"opened"}