Plugin Directory

Changeset 1542330


Ignore:
Timestamp:
11/28/2016 11:34:37 PM (9 years ago)
Author:
clearent1
Message:

Fixed issue where reading debug log could fail on large logs or when no log present.

Location:
clearent-payments
Files:
42 added
3 edited

Legend:

Unmodified
Added
Removed
  • clearent-payments/trunk/clearent_util.php

    r1542264 r1542330  
    142142
    143143    public function logMessage($msg, $path = "") {
    144         if ($path = "") {
     144        if ($path == "") {
    145145            $path = plugin_dir_path(__FILE__);
    146146        }
  • clearent-payments/trunk/main.php

    r1542264 r1542330  
    55 * Plugin URI: https://wordpress.org/plugins/clearent-payments/
    66 * Description: Quickly and easily add secure, PCI Compliant, payment to your WordPress site. This plugin is maintained directly by Clearent, a leader in payments.
    7  * Version: 1.3
     7 * Version: 1.4
    88 * Author: Clearent, LLC.
    99 * Author URI: http://clearent.github.io/wordpress/
     
    191191
    192192                            $logfile = plugin_dir_path(__FILE__) . "log/debug.log";
    193                             $content = file_get_contents($logfile);
    194 
    195                             echo "[" . $logfile . "]";
    196                             echo "<br>";
    197 
    198                             $content = apply_filters('the_content', $content);
    199                             echo $content;
     193
     194                            if (file_exists($logfile)) {
     195                                echo "[" . $logfile . "]";
     196                                echo "<br><br>";
     197                                echo nl2br( file_get_contents($logfile) );
     198                            } else {
     199                                echo "Debug log file does not exist. Turn on debug logging in settings tab to enable debug logs.";
     200                            }
    200201
    201202                            ?>
  • clearent-payments/trunk/readme.txt

    r1542264 r1542330  
    33Tags: clearent, payments, credit card, ecommerce, e-commerce, checkout, pay buttons, hosted pay buttons, payment gateway
    44Requires at least: 4.0
    5 Tested up to: 4.3
    6 Stable tag: 1.3
     5Tested up to: 4.6.1
     6Stable tag: 1.4
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8080* Updated production gateway URL.
    8181* Added debug log to wordpress admin plugin settings page for wordpress admins who may not have access to plugin directory structure.
     82
     83= 1.4 =
     84* Fixed issue where reading debug log could fail on large logs or when no log present.
Note: See TracChangeset for help on using the changeset viewer.