Comments (9)
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.
I tried making a list request, and I keep getting null as a response.
from mailchimp-api-3.0-php.
@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.
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
from mailchimp-api-3.0-php.
@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.
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.
@RobertP3469 Still with me here?
from mailchimp-api-3.0-php.
yep.. kinda busy
from mailchimp-api-3.0-php.
@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)
- New endpoints since last update HOT 2
- Updating setting constants from outside HOT 2
- curl_exec($this->handle) echoes HTTP response HOT 4
- Oauth error HOT 7
- Saving tags HOT 20
- Unable to deserialize response HOT 4
- Not response HOT 3
- Passing language to the subscribed user HOT 8
- SuccessResponse does not properly call success callback. HOT 2
- Batch subscribe list functionality contains error HOT 2
- Getting error "The curl request failed: error:02001018:system library:fopen:Too many open files" HOT 5
- Setting the user-agent HOT 8
- Namespaces HOT 4
- Build Failing HOT 1
- Build Failing - composer.lock outdated HOT 1
- List->Members->Events HOT 5
- does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. HOT 3
- Typo in Wiki: Method $response->wasSuccessful() is incorrect HOT 1
- Add Webhook HOT 2
- Make ApiResource::postToActionEndpoint() public HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailchimp-api-3.0-php.