From 264a7b220c77b8d6a40f4c5438d0c232ae5c83d2 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Tue, 17 Dec 2019 19:59:03 -0700 Subject: [PATCH] Update functions.php (#4958) --- resources/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index 5a33083099..01d15c7834 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1158,11 +1158,11 @@ function number_pad($number,$n) { $color = hsl_to_rgb($hsl[0], $hsl[1], $hsl[2]); //return adjusted color in format received - if ($hash == '#') { //hex + if (isset($hash) && $hash == '#') { //hex for ($i = 0; $i <= 2; $i++) { $hex_color = dechex($color[$i]); if (strlen($hex_color) == 1) { $hex_color = '0'.$hex_color; } - $hex .= $hex_color; + $hex = $hex_color; } return $hash.$hex; } @@ -2045,7 +2045,7 @@ function number_pad($number,$n) { $limit = preg_replace($regex, '', $limit); $offset = preg_replace($regex, '', $offset); if (is_numeric($limit) && $limit > 0) { - $clause .= ' limit '.$limit; + $clause = ' limit '.$limit; $offset = is_numeric($offset) ? $offset : 0; $clause .= ' offset '.$offset; }