Commit 408574d8 authored by git's avatar git Committed by Damien McKenna
Browse files

Issue #2756649 by pbirk, villav74, attheshow, petednz: Numeric Field Handler Converts NULL to Zero

parent ddaeddc3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -118,6 +118,11 @@ class views_handler_field_numeric extends views_handler_field {
  public function render($values) {
    $value = $this->get_value($values);

    // Output nothing if the value is null.
    if (is_null($value)) {
      return '';
    }

    // Hiding should happen before rounding or adding prefix/suffix.
    if ($this->options['hide_empty'] && empty($value) && ($value !== 0 || $this->options['empty_zero'])) {
      return '';