Trying to send a project to CloudWords with Drupal 7 and PHP 7.0.20 fails and produces a bunch of these warnings:

Warning: curl_setopt(): Disabling safe uploads is no longer supported in CloudwordsClient->init() (line 98 of /var/www/html/sites/all/modules/cloudwords/lib/cloudwords_client.php).

This seems to be to do with a change in PHP 7 to the curl_setopt() function which is described here http://php.net/manual/en/function.curl-setopt.php:

Added in PHP 5.5.0 with FALSE as the default value. PHP 5.6.0 changes the default value to TRUE. PHP 7 removes this option; the CURLFile interface must be used to upload files.

So it seems file uploads no longer work via the same interface in PHP 7 and as a result the module is incompatible.

Comments

fraserthompson created an issue. See original summary.

rickyoh’s picture

Assigned: Unassigned » rickyoh
Status: Active » Needs work

  • rickyoh committed bead609 on 7.x-2.x
    Issue #2888301: Incompatibility with PHP 7
    
rickyoh’s picture

Status: Needs work » Fixed

@fraserthompson thanks for the heads up. I had altered the client library a bit for the Drupal 8 version (for PHP 7 compatibility) but hadn't ported those updates over to the client library for the Drupal 7 version of this module.

I've just committed the updates to the latest dev version of the module and I'll be tagging a new 7.x release shortly.

fraserthompson’s picture

Thanks for the super quick fix! Tested and it works fine now.

rickyoh’s picture

Status: Fixed » Closed (fixed)