Parcourir la source

Update functions.php (#4958)

chansizzle il y a 5 ans
Parent
commit
82975e9df6
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      resources/functions.php

+ 3 - 3
resources/functions.php

@@ -1158,11 +1158,11 @@ function number_pad($number,$n) {
 				$color = hsl_to_rgb($hsl[0], $hsl[1], $hsl[2]);
 				$color = hsl_to_rgb($hsl[0], $hsl[1], $hsl[2]);
 
 
 				//return adjusted color in format received
 				//return adjusted color in format received
-				if ($hash == '#') { //hex
+				if (isset($hash) && $hash == '#') { //hex
 					for ($i = 0; $i <= 2; $i++) {
 					for ($i = 0; $i <= 2; $i++) {
 						$hex_color = dechex($color[$i]);
 						$hex_color = dechex($color[$i]);
 						if (strlen($hex_color) == 1) { $hex_color = '0'.$hex_color; }
 						if (strlen($hex_color) == 1) { $hex_color = '0'.$hex_color; }
-						$hex .= $hex_color;
+						$hex = $hex_color;
 					}
 					}
 					return $hash.$hex;
 					return $hash.$hex;
 				}
 				}
@@ -2045,7 +2045,7 @@ function number_pad($number,$n) {
 			$limit = preg_replace($regex, '', $limit);
 			$limit = preg_replace($regex, '', $limit);
 			$offset = preg_replace($regex, '', $offset);
 			$offset = preg_replace($regex, '', $offset);
 			if (is_numeric($limit) && $limit > 0) {
 			if (is_numeric($limit) && $limit > 0) {
-				$clause .= ' limit '.$limit;
+				$clause = ' limit '.$limit;
 				$offset = is_numeric($offset) ? $offset : 0;
 				$offset = is_numeric($offset) ? $offset : 0;
 				$clause .= ' offset '.$offset;
 				$clause .= ' offset '.$offset;
 			}
 			}