Coder Social home page Coder Social logo

Comments (9)

Jhut89 avatar Jhut89 commented on June 26, 2024

Hello @RobertP3469!

#1. You are awesome for checking out this repository! 💯 👍

#2. Taking a look at these Strict Standards warnings you are seeing, it looks like these are from PHP not liking a child class having a method with an identical name to a parent's method that takes different input. So in this case Lists_Members::POST() is generating a warning because Lists::POST() takes different input. These functions take different input by design because they are posting to separate endpoints which expect different parameters. Clearly PHP does not like this though so I will look for a way to get these warnings off the table. If you have any ideas please be sure to throw them my way!

That being said the library should still be usable even with these warnings while I look for a good way get rid of them! Also it appears that PHP 7 did away with E_STRICT. I don't think you would see these warnings on earlier versions outside of strict mode.

Best,
Hutch

from mailchimp-api-3.0-php.

RobertP3469 avatar RobertP3469 commented on June 26, 2024

I tried making a list request, and I keep getting null as a response.

from mailchimp-api-3.0-php.

Jhut89 avatar Jhut89 commented on June 26, 2024

@RobertP3469 I'd be happy to take a look at it with you. Mind sharing your code (minus your API key)?

from mailchimp-api-3.0-php.

RobertP3469 avatar RobertP3469 commented on June 26, 2024

Here's the plugin code I'm working on.
You will need to modify index.php so that your library is loaded and the other MailChimp wrapper class is not loaded.
The testing was being done in the display() function of rdpBCGAdmin_Mapping.php.
Also, I modified your Mailchimp class, by adding a verify_ssl property, like the other MailChimp wrapper class has, and then I modified the curl functions to utilize the verify_ssl property.
My development environment: IIS 7, PHP 5.5.30, WP 4.4.6

rdp-buddychimp-groups.zip

from mailchimp-api-3.0-php.

Jhut89 avatar Jhut89 commented on June 26, 2024

@RobertP3469 Thanks for that!

Could you try replacing return json_decode($this->response, false); with just return $this->response; in the curl functions in mailchimpRoot.php and see if you still get a null value. I have a feeling that whats being returned is not valid JSON hence you are seeing NULL returned. Can you let me know if you are seeing a change after that?

I am successfully making calls against list endpoint in my environment. Although I admittedly don't have a wordpress testing environment to try and replicate exactly.

I'm going to add a To-Do for some logic to keep that JSON encode thing from happening in the future. Shouldn't be a huge change.

As well after thinking about it last night I'm likely going to implement a refactor to take care of those PHP warnings. I'm going to move all Verb methods for each endpoint into the Mailchimp class and leave a list of required params in each class for each method. I'm still working out the nitty gritty of it but this is likely going to be a larger refactor.

Lemme know what you see after replacing that code!

Best,
Hutch

from mailchimp-api-3.0-php.

Jhut89 avatar Jhut89 commented on June 26, 2024

Also I like your implementation for verify_ssl mind if I use it (or if you want credit mind opening a PR)? Once we have worked out whats going on.

from mailchimp-api-3.0-php.

Jhut89 avatar Jhut89 commented on June 26, 2024

@RobertP3469 Still with me here?

from mailchimp-api-3.0-php.

RobertP3469 avatar RobertP3469 commented on June 26, 2024

yep.. kinda busy

from mailchimp-api-3.0-php.

Jhut89 avatar Jhut89 commented on June 26, 2024

@RobertP3469 All good when you do get a sec check out latest version. PHP Warnings should be fixed. I'm going to go ahead and close this issue but feel free to open another should you run into anything else.

from mailchimp-api-3.0-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.