Mam chyba dość nie typowy problem. Zacznę od zaprezentowania kodu:
<?php //------------------------------------- // Check all possible errors... //------------------------------------- if ( !$this->to_user['id'] ) { } else if ( $this->ipsclass->input['to_id'] == $this->ipsclass->member['id'] ) { } else if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['banned_group'] ) { } else if ( $this->ipsclass->input['amount'] <= 0 ) { } else if ( $this->ipsclass->input['amount'] > $this->ipsclass->member['fg'] ) { } else if ( $this->ipsclass->input['from'] != $this->ipsclass->member['id'] ) { } else if ( $this->ipsclass->member['fg_locked'] == 1 ) { } { } ?>
Warunek nad którym ubolewam to:
<?php else if ( $this->ipsclass->input['amount'] > $this->ipsclass->member['fg'] ) { } ?>
Wartości? A więc tutaj jest prosta odpowiedź - z bazy ( $this->ipsclass->member['fg'] ) pobiera w formie x, xxx.xx ( number_format($data, 2, '.', ',' ), a pole usera ( $this->ipsclass->input['amount'] ) jest pobierane z formularza również jako string. Gdzie jest problem? Ułamki, tu się sypie. Kolejna sprawa to setki, tysięcy nawet nie sprawdzałem. Jak takie coś sprawdzać?
PS. Narzucanie typów nic nie daję.
Pozdrawiam,
Largo