You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-11-24 15:51:42

Eric26
Member
From: Valence (26)
Registered: 2007-02-17
Posts: 433
Website

Plugin OCSNG 1.7.3 et GLPI 9.5.11 - Warning PHP sur toutes les pages

Bonjour,

Suite à la mise à jour de notre GLPI de la V9.5.7 à la 9.5.11, le plugin OCSNG 1.7.3 (dernière version compatible avec GLPI 9.5.x) affiche des messages warning PHP sur toutes les pages en profil super-admin seulement :

PHP Warning (2): Declaration of PluginOcsinventoryngTeamviewer::generateLinkContents($link, CommonDBTM $item) should be compatible with CommonDBTM::generateLinkContents($link, CommonDBTM $item, bool $safe_url = true) in .\plugins\ocsinventoryng\inc\teamviewer.class.php at line 326

Y a-t-il un fix pour résoudre cela ?

En vous remerciant par avance.


Amicalement,
Eric
-------------------------------------------------------------
Prod : GLPI 10.0.9 - Serveur IIS8.5 (w2012r2) - PHP 8.1.21 - MySql 5.7.11 -- Test : GLPI 10.0.9 - Serveur IIS8.5 (w2012r2) - PHP 8.1.21 - MySql 5.7.11

Offline

#2 2023-01-24 11:53:01

jlb59
Member
From: Valenciennes
Registered: 2008-07-29
Posts: 116

Re: Plugin OCSNG 1.7.3 et GLPI 9.5.11 - Warning PHP sur toutes les pages

Bonjour

voici un patch correctif , je ne l'ai pas encore testé

--- glpi/plugins/ocsinventoryng/inc/teamviewer.class.php.orig    2023-01-11 18:48:04.289118138 +0100
+++ glpi/plugins/ocsinventoryng/inc/teamviewer.class.php    2023-01-11 18:48:18.389146792 +0100
@@ -323,7 +323,7 @@
     *
     * @return array
     */
-   static function generateLinkContents($link, CommonDBTM $item) {
+   static function generateLinkContents($link, CommonDBTM $item, bool $safe_url = true) {

       if (strstr($link, "[TWID]")) {
          $link = str_replace("[TWID]", $item->fields['twid'], $link);



Cordialement


REDHAT 8.6 sur ESX vmware, glpi 10.0.10, OCS 2.3.1
Plugin : Import OCSNG,  Injection de fichiers , Impression pdf , uninstal,  rapport, comportement, OAUTH.
35000 utilisateurs , 2.5 millions de tickets

Offline

#3 2023-01-24 12:08:12

Eric26
Member
From: Valence (26)
Registered: 2007-02-17
Posts: 433
Website

Re: Plugin OCSNG 1.7.3 et GLPI 9.5.11 - Warning PHP sur toutes les pages

Bonjour jlb59 et merci pour le patch !

Je l'ai appliqué et plus de warnings. Pas d'impact a priori sur le fonctionnement du plugin.


Amicalement,
Eric
-------------------------------------------------------------
Prod : GLPI 10.0.9 - Serveur IIS8.5 (w2012r2) - PHP 8.1.21 - MySql 5.7.11 -- Test : GLPI 10.0.9 - Serveur IIS8.5 (w2012r2) - PHP 8.1.21 - MySql 5.7.11

Offline

Board footer

Powered by FluxBB