robbiepaul / cloudconvert-laravel

A Laravel wrapper for the CloudConvert API
177 stars 34 forks source link

PHP Fatal error: Unsupported operand types in vendor/robbiep/cloudconvert-laravel/src/RobbieP/CloudConvertLaravel/HttpClientAdapter.php on line 31 #2

Closed andresnijder closed 9 years ago

andresnijder commented 9 years ago

occurs: CloudConvert::file($path) ->callback(url() . '/api/notifications/convert/videos') ->to('ogg');

robbiepaul commented 9 years ago

Can you provide the contents of $path?

andresnijder commented 9 years ago

$path = 'http://cdn.vellance.com/superhero/site/content/uploads/project/small_54735848bc3f8.mp4';

robbiepaul commented 9 years ago

What version of php are you using?

Also the syntax for using callbacks should be:

CloudConvert::file($path)
->callback(url() . '/api/notifications/convert/videos')
->convert('ogg');

Because to() attempts to save the file when it isn't ready. The save function should be called in the callback script.

Hope that helps

andresnijder commented 9 years ago

I'm using PHP 5.5.14-1~dotdeb.1 I get the same error when i use 'convert'.

robbiepaul commented 9 years ago

I've applied a fix in the latest update: 3a275f854f3297d2b32547de81648c172e391302 Try a composer update robbiep/cloudconvert-laravel

andresnijder commented 9 years ago

thanks! This works!