centreon/centreon-archived

[CLAPI] PHP Warning: Undefined variable $paramString

proxyconcept opened this issue · 1 comments

BUG REPORT INFORMATION

Prerequisites

Versions

centreon-web-22.04.0-2.el8.noarch

Operating System

Red Hat Enterprise Linux 8.6 (Ootpa)

Description

Some CLAPI commands causes this PHP Warning: Undefined variable $paramString

Steps to Reproduce

For example:
centreon -u admin -p '******' -o CMD -a getparam -v 'App-Monitoring-Centreon-Service-Dummy;line'

Describe the received result

PHP Warning:  Undefined variable $paramString in /usr/share/centreon/www/class/centreon-clapi/centreonCommand.class.php on line 218
line
$CENTREONPLUGINS$/centreon_centreon_central.pl --plugin=apps::centreon::local::plugin --hostname=$HOSTADDRESS$ --mode=broker-stats --broker-stats-file='$_HOSTSQLSTATSFILE$' --broker-stats-file='$_HOSTRRDSTATSFILE$' --broker-stats-file='$_HOSTMODULESTATSFILE$' --filter-name='$_SERVICEFILTERNAME$' --warning-speed-events='$_SERVICEWARNINGSPEEDEVENTS$' --critical-speed-events='$_SERVICECRITICALSPEEDEVENTS$' --warning-queued-events='$_SERVICEWARNINGQUEUEDEVENTS$' --critical-queued-events='$_SERVICECRITICALQUEUEDEVENTS$' --warning-unacknowledged-events='$_SERVICEWARNINGUNACKNOWLEDGEDEVENTS$' --critical-unacknowledged-events='$_SERVICECRITICALUNACKNOWLEDGEDEVENTS$' --warning-status='$_SERVICEWARNINGSTATUS$' --critical-status='$_SERVICECRITICALSTATUS$' $_SERVICEEXTRAOPTIONS$

Describe the expected result

Same as below, but without the PHP error.

This partially solves #10566