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

Deprecated prefix '@' in upload (PHP 5.5) #1

Closed
pepelopz opened this issue Nov 13, 2013 · 2 comments
Closed

Deprecated prefix '@' in upload (PHP 5.5) #1

pepelopz opened this issue Nov 13, 2013 · 2 comments

Comments

@pepelopz
Copy link

Hi! Awesome library and awesome cloudConvert!

I find this problem for php5.5:
in the upload function there's a call to the 'req' private method that use CURLOPT_POSTFIELDS passing args like 'file' => '@'.$filename. The '@' prefix is deprecated in this version and i have to use CURLFILE instead.

Line 77:
replace 'file' => '@'.$filepath
by 'file' => new CURLFile($filepath)

@josiasmontag
Copy link
Contributor

Thanks for your feedback and letting us know!
I just comitted a fix which should solve this issue by using CURLFile, if available.

Could you please give short feedback if it works now (I currently do not have PHP 5.5 installed for testing). Thanks!

@pepelopz
Copy link
Author

Perfect! There is only a detail:
class_exists() accepts string parameter, not a constant. You need add quotes (class_exists('CURLFile')).

Thanks in advance!!

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

2 participants