Skip to content
This repository was archived by the owner on Dec 13, 2022. It is now read-only.

Issue 11673: unify parseShowParameters between CentreonRtDowntime and CentreonRtAcknowledgement #12049

Closed
wants to merge 2 commits into from
Closed

Conversation

mayrstefan
Copy link
Contributor

Description

This PR unifies parseShowParameters between CentreonRtDowntime and CentreonRtAcknowledgement classes für CLAPI to get rid of the following message:

PHP Warning:  Undefined array key 1 in /usr/share/centreon/www/class/centreon-clapi/centreonRtDowntime.class.php on line 174

From CentreonRtAcknowledgement we use the more sophisticated handling to parse parameters into type and ressouce
From CentreonRtDowntime we use the style to generate the return value

Partially Fixes #11673

Type of change

  • 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
  • 22.04.x
  • 22.10.x (master)

How this pull request can be tested ?

Use CLAPI to add and remove Host and Service-Downtimes

Checklist

Community contributors & Centreon team

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially new classes, functions or any legacy code modified. (docblock)
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (master, maintenance).

The PR is based on the develop branch because that seems is the current default branch.

Copy parameters handling in parseShowParameters from centreonRtAcknowledgement to remove WARNING of Undefined array key 1
Unifiy parseShowParameters between centreonRtAcknowledgement and centreonRtDowntime. Use return array()
@mayrstefan mayrstefan requested review from a team, dmyios and wtermellil October 30, 2022 08:41
@sonarqube-decoration
Copy link

SonarQube Quality Gate

Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
100.0% 100.0% Duplication

@kduret
Copy link
Contributor

kduret commented Nov 8, 2022

@mayrstefan mayrstefan closed this by deleting the head repository Dec 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants