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

fix(php): fix problems related to PHP 8.0 upgrade #10297

Merged
merged 6 commits into from
Oct 19, 2021
Merged

Conversation

AssanDiomande
Copy link
Contributor

@AssanDiomande AssanDiomande commented Oct 13, 2021

Description

Fixes MON-11253

Correction of several problems concerning centreon PHP


Image

  • add required => "true" on include/options/media/images/formDirectory.php on the attrsSelect array at line 117 to force the user to select an image
  • moved the selectIds definition in the IMAGE_DELETE case on include/options/media/images/images.php at line 93 to call call it only in the case of a deletion

Host template

  • add if statement on include/configuration/configObject/host/DB-Func.php at line 2332 to check if $ret is empty or not

Service template

  • add statement require_once "./include/common/javascript/commandGetArgs/cmdGetExample.php" on include/configuration/configObject/service/DB-Func.php at line 1757 to access the myDecodeService function

Service by host group

  • move the $query argument from $dbResult3->fetch function to $pearDB->query function on include/configuration/configObject/service/DB-Func.php at line 450

Connectors

  • work well, nothing to change

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
  • Updating documentation (missing information, typo...)

Target serie

  • 20.04.x
  • 20.10.x
  • 21.04.x
  • 21.10.x (master)

How this pull request can be tested ?

Image

  • go to Administration > Parameters > Images
  • select an image name and choose "move images" in the select box
  • complete the form you will be redirected to the previous page

Host template

  • go to Configuration > Hosts > Templates
  • select one or more items
  • select "massive change" in the checkbox
  • complete the form and you will be redirected to the previous page

Services templates

  • go to Configuration > Services > Templates
  • select one or more items
  • select "massive change" in the checkbox
  • complete the form and you will be redirected to the previous page

Services by host group

  • go to Configuration > Services > Services by host group
  • select one or more items
  • select "detach host group services" in the checkbox and confirm

@AssanDiomande AssanDiomande requested review from a team, callapa and a-launois October 13, 2021 14:55
log/install_centreon.log Outdated Show resolved Hide resolved
@AssanDiomande AssanDiomande requested a review from callapa October 15, 2021 14:08
@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 D 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@kduret kduret changed the title problems fixed with PHP 8.0 fix(php): fix problems related to PHP 8.0 upgrade Oct 18, 2021
@AssanDiomande AssanDiomande merged commit 8db244e into develop Oct 19, 2021
@AssanDiomande AssanDiomande deleted the MON-11253 branch October 19, 2021 11:02
AssanDiomande added a commit that referenced this pull request Oct 26, 2021
* problems fixed with PHP 8.0

* fixed centreon-box suggestions

* resolved centreon-bot suggestions

* Delete ldap-test.yml

* Delete log

* Update listImg.ihtml
kduret pushed a commit that referenced this pull request Oct 26, 2021
* problems fixed with PHP 8.0

* fixed centreon-box suggestions

* resolved centreon-bot suggestions

* Delete ldap-test.yml

* Delete log

* Update listImg.ihtml
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants