centreon-archived
centreon-archived copied to clipboard
fix(clapi): Wrong test on undefined variable (#11438)
Refs: #11438 Signed-off-by: Grégory Marigot [email protected]
Description
Test for empty $paramString should use "isset" to avoid a PHP warning.
Fixes #11438
Type of change
- [x] Patch fixing an issue (non-breaking change)
- [ ] New functionality (non-breaking change)
- [ ] Breaking change (patch or feature) that might cause side effects breaking part of the Software
Target serie
- [ ] 21.04.x
- [ ] 21.10.x
- [x] 22.04.x
- [ ] 22.10.x (master)
How this pull request can be tested ?
This patch suppress this kind of warning:
clapi -u admin -p '******' -o CMD -a getparam -v "host-notify-by-email;name"
PHP Warning: Undefined variable $paramString in /usr/share/centreon/www/class/centreon-clapi/centreonCommand.class.php on line 218
name
host-notify-by-email
Checklist
Community contributors & Centreon team
- [x] I have followed the coding style guidelines provided by Centreon
- [x] I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
- [x] I have commented my code, especially hard-to-understand areas of the PR.
- [x] I have rebased my development branch on the base branch (master, maintenance).
Related ticket : MON-15348
SonarQube Quality Gate
0 Bugs
0 Vulnerabilities
0 Security Hotspots
8 Code Smells
No Coverage information
100.0% Duplication
SonarQube Quality Gate
0 Bugs
0 Vulnerabilities
0 Security Hotspots
8 Code Smells
No Coverage information
100.0% Duplication
migrated to https://github.com/centreon/centreon-gha/pull/