diff --git a/WpMailCatcher.php b/WpMailCatcher.php index eb0de37..cd2d403 100644 --- a/WpMailCatcher.php +++ b/WpMailCatcher.php @@ -6,7 +6,7 @@ Domain Path: /languages Description: Logging your mail will stop you from ever losing your emails again! This fast, lightweight plugin (under 140kb in size!) is also useful for debugging or backing up your messages. Author: James Ward -Version: 2.0.3 +Version: 2.0.4 Author URI: https://jamesward.io Donate link: https://paypal.me/jamesmward */ diff --git a/build/grunt/package.json b/build/grunt/package.json index 015edc0..c125daf 100644 --- a/build/grunt/package.json +++ b/build/grunt/package.json @@ -1,6 +1,6 @@ { "name": "WpMailCatcher", - "version": "2.0.3", + "version": "2.0.4", "lang_po_directory": "../../languages", "build_directory": "./..", "dist_directory": "../../assets", diff --git a/readme.txt b/readme.txt index f35041c..b914d99 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: mail logging, email log, email logger, logging, email logging, mail, crm Requires at least: 4.7 Tested up to: 6.0 Requires PHP: 7.2 -Stable tag: 2.0.3 +Stable tag: 2.0.4 License: GNU General Public License v3.0 License URI: https://raw.githubusercontent.com/JWardee/wp-mail-catcher/master/LICENSE Donate link: https://paypal.me/jamesmward @@ -94,6 +94,10 @@ Great! Please leave a note in our (GitHub tracker) == Changelog == += 2.0.4 = + +- Fix: Resolved memory leak when saving a new log + = 2.0.3 = - Fix: Auto deleting clearing all logs diff --git a/src/Loggers/LogHelper.php b/src/Loggers/LogHelper.php index b98437b..f7cf8b9 100644 --- a/src/Loggers/LogHelper.php +++ b/src/Loggers/LogHelper.php @@ -33,7 +33,7 @@ public function saveMail($args, $transformFunc) $args['to'] = []; } - do_action(GeneralHelper::$actionNameSpace . '_mail_success', Logs::getFirst(['id' => $this->id])); + do_action(GeneralHelper::$actionNameSpace . '_mail_success', Logs::getFirst(['post__in' => $this->id])); return $args; } @@ -63,7 +63,7 @@ public function saveError($error) Cache::flush(); - do_action(GeneralHelper::$actionNameSpace . '_mail_failed', Logs::getFirst(['id' => $this->id])); + do_action(GeneralHelper::$actionNameSpace . '_mail_failed', Logs::getFirst(['post__in' => $this->id])); } public function saveIsHtml($contentType)