From a4ec7d04d34bb891c55d3cd7da9f732163fad765 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Wed, 25 Apr 2012 10:27:46 +0100 Subject: [PATCH] Prevent arrays which fail the empty() check --- classes/class-wc-tax.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/class-wc-tax.php b/classes/class-wc-tax.php index d6f1f101b70..2768b6a2689 100644 --- a/classes/class-wc-tax.php +++ b/classes/class-wc-tax.php @@ -19,8 +19,8 @@ class WC_Tax { if (!is_array($this->parsed_rates)) : global $woocommerce; - $tax_rates = (array) get_option('woocommerce_tax_rates'); - $local_tax_rates = (array) get_option('woocommerce_local_tax_rates'); + $tax_rates = array_filter( (array) get_option('woocommerce_tax_rates') ); + $local_tax_rates = array_filter( (array) get_option('woocommerce_local_tax_rates') ); $parsed_rates = array(); $flat_rates = array();