Running this module in a PHP 7 environment generates the following error from the class.cc.php file:

PHP 4 constructors are now deprecated
    function cc($api_username, $api_password)
    {
    }

As of PHP 7 you can no longer use the class name as the constructor function name and must use __construct instead.

Comments

fbailey created an issue. See original summary.

fbailey’s picture

Issue summary: View changes
fbailey’s picture

Issue summary: View changes
fbailey’s picture

StatusFileSize
new493 bytes
fbailey’s picture

Status: Active » Needs review
chris matthews’s picture

Hi, does this issue stem from the following php notice? I didn't want to duplicate.

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; cc has a deprecated constructor in /srv/bindings/647479ef89424665812391f08bfbeaec/code/sites/all/modules/constant_contact/class.cc.php on line 12

karlshea’s picture

Status: Needs review » Reviewed & tested by the community

Works

damienmckenna’s picture

Version: 7.x-3.6 » 7.x-3.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new509 bytes

Rerolled against 7.x-3.x-dev.

chris matthews’s picture

The patch in #8 works for me on 7.x-3.x-dev, but leaving the status as is in case others would like to chime in before changing to RTBC.

wylbur’s picture

Status: Needs review » Reviewed & tested by the community

Applied the patch, and this resolved the PHP errors. Using php 7.0, and dev version of the Constant Contact module.

Marking as RTBC

hargobind’s picture

Works as advertised on PHP 7.1.
RTBC++

khaldoon_masud’s picture

+1

brightbold’s picture

This solved the problem for me too on PHP 7.2.

crutch’s picture

+1 Yes this patch combined with this patch are working together on php7.3