Unused Local Variable? Bug?

Can someone tell me why it's calling this variableu ($sPlusMinus) unused?

public static function ProgressAllMachineSteps(){

  global $iProgressID, $sPlusMinus, $iStepChangeAmount, $sPTOT, $sHeavyLight, $bReset;

  if(!$bReset){

   $sSQL = "SELECT p.*
     FROM 75_steps_{$sPTOT}_progress p
     WHERE p.id=$iProgressID";
   $rSQL = MYSQLQuery($sSQL);

   if($rSQL) $aSQL = mysql_fetch_array($rSQL);

  }

  $aMachines = Common::GetWholeTable('75_steps_'.$sPTOT.'_machines');

  foreach($aMachines as $aMachine){

   if(strtolower($sHeavyLight) == 'heavy') $aLH = array('heavy');
   elseif(strtolower($sHeavyLight) == 'light') $aLH = array('light');
   else $aLH = array('light', 'heavy');

   foreach($aLH as $sLH){

    $sMachine = $aMachine['machine'].'_step_'.$sLH;

    if($bReset)
     $aNewStep[] = '`'.$sMachine.'`='.self::$iDefaultStep;
    elseif($sPlusMinus == '+')
     $aNewStep[] = '`'.$sMachine.'`='.
        ((($aSQL[$sMachine] + $iStepChangeAmount) > 75) ? 75 :
         $aSQL[$sMachine] + $iStepChangeAmount);
    elseif($sPlusMinus == '-')
     $aNewStep[] = '`'.$sMachine.'`='.
        ((($aSQL[$sMachine] - $iStepChangeAmount) < 1) ? 1 :
         $aSQL[$sMachine] - $iStepChangeAmount);

   }

  }

  $sSQL = "UPDATE 75_steps_{$sPTOT}_progress
    SET
     ".Comma($aNewStep)."
    WHERE id=$iProgressID";
  MYSQLQuery($sSQL);

  require_once '../popups/popup_code.php';

  self::ProgressTrackingUI();

}

Please sign in to leave a comment.