Joomla.it Forum

Non solo Joomla... => Sviluppo => : luca.santaniello 05 May 2009, 22:32:10

: Object of class JParameter could not be converted to string [RISOLTO]
: luca.santaniello 05 May 2009, 22:32:10
Salve raga...

sto provando a sviluppare un componente/modulo per la versione 1.5...

Mi son bloccato perchè il seguente codice mi restituisce un errore:

$query = "SELECT * FROM tornei where idTorneo = " . $idTorneo;

Catchable fatal error: Object of class JParameter could not be converted to string

Consigli?      
: Re: Object of class JParameter could not be converted to string
: teakor 06 May 2009, 11:52:24
non credo dipenda da quella riga specifica.

$query ovviamente la passi alle funzioni di joomla per processare le chiamate al db.

Posta anche quello che hai scritto dopo la riga di codice che hai messo vediamo se può essere lì l'errore.

L'errore che ti tira fuori è solo "Catchable fatal error: Object of class JParameter could not be converted to string" oppure ti dice anche altro? Se sì posta tutto quello che ti dice.
: Re: Object of class JParameter could not be converted to string
: luca.santaniello 06 May 2009, 23:33:09
Ho trasformato in:

$query = "SELECT * FROM tornei where idTorneo = " . (int)$idTorneo;

e funziona

Grazie lo stesso
: Re: Object of class JParameter could not be converted to string
: teakor 06 May 2009, 23:53:01
perfetto metti in testa all'oggetto del post [RISOLTO]