ActiveCampaign / postmark-wordpress

The Official Postmark Wordpress Plugin
GNU General Public License v2.0
17 stars 17 forks source link

Many notices related to the constants being already defined. #51

Closed cklosowski closed 4 years ago

cklosowski commented 4 years ago

It doesn't affect the functionality, but it appears there is possibly a path that leads two instances of the main Postmark_Mail to be instantiated, and because the __construct is setting some constants, it is possible for the notices to be dropped into the debug log.

A simple step for now would just be to throw in a "! defined()check on each constant before usingdefine`. This at least prevents the plugin from trying to redefine constants and reduces the footprint on the logs.

PR Incoming as well for you.