Question

PHP Warning: Undefined variable $paramString

  • 23 June 2023
  • 7 replies
  • 110 views

Badge +1

Bonjour,
Utilisateur de clapi j’ai remarqué que lorsque j’utilisais getparam sur les services j’ai l’erreur:

PHP Warning:  Undefined variable $paramString in /usr/share/centreon/www/class/centreon-clapi/centreonService.class.php on line 579

 

Je suis allé voir dans le fameux fichier php et la variable paramstring n’est pas défini selon mes maigres connaissances.
C’est non bloquant mais pour éviter à l’erreur de s’afficher à chaque ligne de commande j’ai défini la variable.

L’erreur vient de moi ou c’est un oubli ?

Bonne journée :)
 


7 replies

Userlevel 4
Badge +13

👋

@tdsbaa

 Have you tried an update and see if continues to be an issue. If the update doesn’t change the result, which version are you on?

Badge +1

I will update centreon on 23.04 in the summer. I’m on 22.10.5 now.
Thank you for your quick response.

Userlevel 4
Badge +13

I see it, I’ll ask around for the PR 😁😉

Badge +1

As a workaround, i defined Paramstring=”” and no error for the moment

Userlevel 4
Badge +13

You might be interested in

https://github.com/centreon/centreon-archived/pull/11439

For now. ( not official ) 

🤞

Badge +1

Thank you, it’s a better workaround than mine!

Hi,

I know warnings isn’t bugs but it would be nice if this fix may be applied to the 22.10 branch too.

This is annoying to have to use grep o get rid of all this garbage every times when looking at the log file when searching for something.
 

Reply