Skip to content

undefined offset 1, cc_class line 135 #5

Description

@LouWii

Hi,
In case anyone got this issue, I fixed it. As cc_class.php is provided by ConstantContact, I didn't make a pull request, but I can do it if needed.

The code fixed, line 132 in lk_cc\cc_class.php :

             if ((string) $tmp->rel == 'next') {
                    $nextUrl = (string) $tmp->href;
                    $arrTmp = explode($this->login, $nextUrl);
                    if (array_key_exists(1, $arrTmp))
                    {
                        $nextUrl = $arrTmp[1];
                        $call2 = $this->apiPath.$nextUrl;
                    }
                    else
                    {
                        $call2 = NULL;
                    }

                    break;
            }

Basically, we verify if the "next url" is present. If not, set $call2 to null so we know we got all lists from ConstantContact.
I don't know if that's the proper way to fix it, but it works. And as API v1 is deprecated, I don't think ConstantContact team is caring about that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions