Skip to content

Commit

Permalink
fixes #1404
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Jun 22, 2017
1 parent 9d6a955 commit 16c1d05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions field/class-kirki-field-number.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public function sanitize( $value = null ) {

// Step divider.
if ( isset( $this->choices['min'] ) && isset( $this->choices['step'] ) ) {
// Keep calculation simple to avoid memory issues.
if ( 1 > $step || $max - $min > 100 ) {
return $value;
}
$valid = range( $min, $max, $step );

$smallest = array();
Expand Down

0 comments on commit 16c1d05

Please sign in to comment.