ServerStatus: Null return

Discussion in 'Bug Reports' started by Mun, Mar 30, 2015.

  1. Mun

    Mun Administrator

    PHP:

    function levels($perc$dl$wl){
    // make nice green bars
    if($perc 30) {
    $width 30;
    } else {
    $width $perc;
    }
    if(
    $perc $wl) {
    $return '<div class="progress progress-striped active"><div class="bar bar-success" style="width: ' $width '%;">' $perc '%</div</div>';
    }
    elseif(
    $perc $wl) {
    $return '<div class="progress progress-striped active"><div class="bar bar-warning" style="width: ' $width '%;">' $perc '%</div></div>';
    }
    elseif(
    $perc $dl) {
    $return '<div class="progress progress-striped active"><div class="bar bar-danger" style="width: ' $width '%;">' $perc '%</div></div>';
    }
    return 
    $return;

    }

    Issues:

    Returns null value when at $wl.
     
  2. Mun

    Mun Administrator

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice