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

undefined offset 1, cc_class line 135 #5

Open
LouWii opened this issue Feb 26, 2015 · 1 comment
Open

undefined offset 1, cc_class line 135 #5

LouWii opened this issue Feb 26, 2015 · 1 comment

Comments

@LouWii
Copy link

LouWii commented Feb 26, 2015

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.

@loren138
Copy link
Owner

Hm, I wonder if this issue is the same idea as #3? If anyone else can confirm this works, I could merge a pull request on it so future people don't have it.

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