Plugin Directory

Changeset 1643029


Ignore:
Timestamp:
04/22/2017 04:00:40 PM (9 years ago)
Author:
turtlepod
Message:

Prevent fatal error when logging invalid usage of wp_mail.

Location:
fx-email-log/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • fx-email-log/trunk/fx-email-log.php

    r1520076 r1643029  
    44 * Plugin URI: http://genbumedia.com/plugins/fx-email-log/
    55 * Description: Simple plugin to log all email sent via WordPress.
    6  * Version: 1.0.2
     6 * Version: 1.0.3
    77 * Author: David Chandra Purnama
    88 * Author URI: http://shellcreeper.com/
  • fx-email-log/trunk/includes/log-email.php

    r1499275 r1643029  
    3232     */
    3333    public function log_email( $mail_info ) {
     34
     35        $defaults = array(
     36            'to'          => '',
     37            'subject'     => '',
     38            'message'     => '',
     39            'headers'     => '',
     40            'attachments' => 'false',
     41        );
     42        $mail_info = wp_parse_args( $mail_info, $defaults );
     43
     44        /* Do not log invalid email  */
     45        if ( empty( $mail_info['to'] ) && ! is_email( $mail_info['to'] ) ) {
     46            return false;
     47        }
     48
     49        /* Table name */
    3450        global $wpdb;
    3551        $table_name = "{$wpdb->prefix}fx_email_log";
  • fx-email-log/trunk/languages/fx-email-log.pot

    r1499272 r1643029  
    44"Project-Id-Version: Genbu Media f(x) Plugins\n"
    55"Report-Msgid-Bugs-To: \n"
    6 "POT-Creation-Date: 2016-09-17 15:04+0700\n"
     6"POT-Creation-Date: 2017-04-22 22:56+0700\n"
    77"PO-Revision-Date: \n"
    88"Last-Translator: David Chandra Purnama <[email protected]>\n"
     
    1515"_n;_x:1,2c;_n:1,2\n"
    1616"X-Poedit-Basepath: ..\n"
    17 "X-Generator: Poedit 1.8.8\n"
     17"X-Generator: Poedit 2.0.1\n"
    1818"X-Poedit-SearchPath-0: .\n"
    1919
     
    5151
    5252#: includes/log-list-table.php:113
    53 msgid "Email Content"
    54 msgstr ""
    55 
    56 #: includes/log-list-table.php:114
    5753msgid "View Content"
    5854msgstr ""
    5955
    60 #: includes/log-list-table.php:118 includes/log-list-table.php:203
     56#: includes/log-list-table.php:117 includes/log-list-table.php:202
    6157msgid "Delete"
    6258msgstr ""
    6359
    64 #: includes/log-list-table.php:180
     60#: includes/log-list-table.php:179
    6561msgid "No"
    6662msgstr ""
    6763
    68 #: includes/log-list-table.php:180
     64#: includes/log-list-table.php:179
    6965msgid "Yes"
    7066msgstr ""
    7167
    72 #: includes/log-list-table.php:204
     68#: includes/log-list-table.php:203
    7369msgid "Delete All Logs"
    7470msgstr ""
    7571
    76 #: includes/log-list-table.php:251
     72#: includes/log-list-table.php:250
    7773msgid "Email Log Deleted."
    7874msgstr ""
    7975
    80 #: includes/log-list-table.php:259
     76#: includes/log-list-table.php:258
    8177msgid "Fail to Delete Email Log. Please try again."
    8278msgstr ""
    8379
     80#: includes/log-list-table.php:266
     81msgid "Cheatin&#8217; uh?"
     82msgstr ""
     83
    8484#: includes/log-list-table.php:267
    85 msgid "Cheatin&#8217; uh?"
    86 msgstr ""
    87 
    88 #: includes/log-list-table.php:268
    8985msgid "Sorry, you are not allowed to delete email log."
    9086msgstr ""
    9187
    92 #: includes/log-list-table.php:357
     88#: includes/log-list-table.php:356
    9389msgid "Your email log is empty"
    9490msgstr ""
     
    126122msgstr ""
    127123
    128 #: includes/settings.php:47 includes/settings.php:48 includes/settings.php:95
     124#: includes/settings.php:50 includes/settings.php:51 includes/settings.php:107
    129125msgid "Email Log"
    130126msgstr ""
    131127
    132 #: includes/settings.php:71
     128#: includes/settings.php:84
    133129msgid "Entries per page"
    134130msgstr ""
    135131
    136 #: includes/settings.php:100
     132#: includes/settings.php:112
    137133msgid "Search Logs"
     134msgstr ""
     135
     136#: includes/settings.php:125
     137msgid "Email Content"
    138138msgstr ""
    139139
  • fx-email-log/trunk/readme.txt

    r1520076 r1643029  
    33Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TT23LVNKA3AU2
    44Tags: Email,Email Log,Database,Log,Contact Form,Contact Form 7
    5 Requires at least: 4.4
    6 Tested up to: 4.6
    7 Stable tag: 1.0.2
     5Requires at least: 4.5
     6Tested up to: 4.7
     7Stable tag: 1.0.3
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5151== Changelog ==
    5252
     53= 1.0.3 - 22 Apr 2017 =
     54* Prevent fatal error when logging invalid usage of wp_mail.
     55
    5356= 1.0.2 - 23 Oct 2016 =
    5457* Responsive modal box (no longer use wp core thickbox).
Note: See TracChangeset for help on using the changeset viewer.