Joomla.it Forum

Non solo Joomla... => Sviluppo => : gt_67 20 Aug 2008, 12:01:51

: mosGetParam non mi restituisce i double .... !!!
: gt_67 20 Aug 2008, 12:01:51
Ciao a tutti,

Ho questo problema: mosGetParam non restituisce i double ma trasforma tutto in Integer.

Sono andato a vedere il codice di joomla.php ed effettivamente è così:

function mosGetParam( &$arr, $name, $def=null, $mask=0 ) {
[... omissis ...]
            if (empty($return) && is_numeric($def)) {
            // if value is defined and default value is numeric set variable type to integer
               $return = intval($return);

[... omissis ...]

In pratica mi restituisce un integer se il valore del default è numerico ..... mha .... mi sembra strano... voi che ne dite ?

Come faccio ad ottenere un double da una form input ?

Grazie  e ciao.