From 5174335e62cfaa2f9ed4f21d7db3b1a4289db88f Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 27 Apr 2014 17:36:52 +1000 Subject: [PATCH] Return default when equation is null --- includes/sp-core-functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php index 2dd931ad..ed64723f 100644 --- a/includes/sp-core-functions.php +++ b/includes/sp-core-functions.php @@ -790,6 +790,9 @@ if ( !function_exists( 'sp_get_eos_safe_slug' ) ) { if ( !function_exists( 'sp_solve' ) ) { function sp_solve( $equation, $vars, $precision = 0 ) { + if ( $equation == null ) + return '-'; + if ( strpos( $equation, '$streak' ) !== false ): // Return direct value