From 27edc925a3369737530e4d8093eb2e6f1f4b2d09 Mon Sep 17 00:00:00 2001 From: Ali YeKen Date: Thu, 12 May 2016 19:16:33 +0100 Subject: [PATCH] 3.5.1 Release --- pro-features/shortcode-chart.php | 4 +++- readme.txt | 8 ++++++-- weight-loss-tracker.php | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pro-features/shortcode-chart.php b/pro-features/shortcode-chart.php index d9850c9e..50e5467c 100644 --- a/pro-features/shortcode-chart.php +++ b/pro-features/shortcode-chart.php @@ -42,7 +42,9 @@ function ws_ls_shortcode_chart($user_defined_arguments) $weight_data = ws_ls_get_weights($chart_arguments['user-id'], $chart_arguments['max-data-points'], -1, 'desc'); // Reverse array so in cron order - $weight_data = array_reverse($weight_data); + if(is_array($weight_data) && !empty($weight_data)) { + $weight_data = array_reverse($weight_data); + } // Render chart if ($weight_data){ diff --git a/readme.txt b/readme.txt index 840e2fdb..9064aa1f 100644 --- a/readme.txt +++ b/readme.txt @@ -3,7 +3,7 @@ Contributors: aliakro Tags: weight, graph, track, stones, kg, table, data, plot, target, history, pounds, responsive, chart Requires at least: 4.1.0 Tested up to: 4.5 -Stable tag: 3.5 +Stable tag: 3.5.1 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -136,10 +136,14 @@ Yes. In WordPress Admin goto Settings > Weight Loss Tracker and change the setti == Changelog == += 3.5.1 = + +* BUG FIX: Additional logic around array_reverse when rendering a chart to ensure the object is an array and not empty. + = 3.5 = * Added locale support for advanced data tables (Pro feature) -* Updated Dutch translations for advanced data tables and others +* Updated Dutch translations for advanced data tables and others = 3.4.1 = diff --git a/weight-loss-tracker.php b/weight-loss-tracker.php index 44df62b9..5627c5a7 100644 --- a/weight-loss-tracker.php +++ b/weight-loss-tracker.php @@ -5,7 +5,7 @@ /** * Plugin Name: Weight Loss Tracker * Description: An easy to use plugin that allows a user to keep track of their weight history in both tabular and chart format. - * Version: 3.5 + * Version: 3.5.1 * Author: YeKen * Author URI: https://www.YeKen.uk * License: GPL2