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 2018-11-28 16:26:42

jules41827
Member
Registered: 2018-09-27
Posts: 9

Update GLPI debug PHP notice

Bonjour,

Je viens d'effectuer l'upgrade de GLPI vers la version 9.3.1 ; tout fonctionne correctement.
J'ai juste un message d'erreur en mode debug mais qui à priori ne pose pas de problème pour le fonctionnement :

PHP Notice: Undefined index: GLPI in /var/www/html/glpi/inc/user.class.php at line 4664

Lorsque je regarde ce fichier et donc cette ligne voici ce que j'ai (en rouge la ligne 4664) :

   /**
    * Check if default passwords always used
    *
    * @return array of login using default passwords
   **/
   static function checkDefaultPasswords() {
      global $DB;

      $passwords = ['glpi'      => 'glpi',
                         'tech'      => 'tech',
                         'normal'    => 'normal',
                         'post-only' => 'postonly'];
      $default_password_set = [];

      $crit = ['FIELDS'     => ['name', 'password'],
                    'is_active'  => 1,
                    'is_deleted' => 0,
                    'name'       => array_keys($passwords)];

      foreach ($DB->request('glpi_users', $crit) as $data) {
         if (Auth::checkPassword($passwords[$data['name']], $data['password'])) {
            $default_password_set[] = $data['name'];
         }
      }

      return $default_password_set;
   }


Est-ce que quelqu'un pourrait m'aider à résoudre cette erreur svp ?

Merci

Offline

#2 2018-11-29 14:56:08

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Update GLPI debug PHP notice

Un PHP notice n'est pas bloquant.
Ce message apparait quand vous faites quoi exactement ?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2018-11-29 16:41:01

jules41827
Member
Registered: 2018-09-27
Posts: 9

Re: Update GLPI debug PHP notice

Juste quand je mets le mode débug. Mais il n'y a apparemment aucune incidence sur le fonctionnement.
Mais je n'aime pas avoir des erreurs sur un système... car si erreur il y a c'est que quelque chose n'est pas configuré/installé comme il faut :-D

Offline

#4 2018-12-03 13:25:24

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Update GLPI debug PHP notice

Quand vous mettez le mode Debug mais que vous êtes positionné sur quel objet ? dans quelle partie de GLPI ? avec ou sans sous-entité ? Authentification automatique ?
Moi en mode Debug je n'ai pas cette erreur


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2018-12-05 11:13:55

jules41827
Member
Registered: 2018-09-27
Posts: 9

Re: Update GLPI debug PHP notice

Sur la page d’accueil de GLPI juste après m'être authentifié.

Offline

#6 2018-12-05 15:52:19

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,273

Re: Update GLPI debug PHP notice

Il me faut le message complet dans glpi/files/_logs/php-error.log


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#7 2018-12-05 18:44:49

jules41827
Member
Registered: 2018-09-27
Posts: 9

Re: Update GLPI debug PHP notice

[2018-12-05 16:41:43] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/inc/toolbox.class.php line 657
  *** PHP Notice(8): Undefined index: GLPI
  Backtrace :
  inc/user.class.php:4664
  inc/central.class.php:161                          User::checkDefaultPasswords()
  inc/central.class.php:82                           Central::showMyView()
  inc/commonglpi.class.php:488                       Central::displayTabContentForItem()
  ajax/common.tabs.php:92                            CommonGLPI::displayStandardTab()
  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.012\", 2.94Mio)"}
[2018-12-05 16:41:45] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_db Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan"}
[2018-12-05 16:41:45] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_trans Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.003\", 1.80Mio)"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_db Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_trans Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.003\", 1.81Mio)"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_db Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_trans Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.003\", 1.81Mio)"}
[2018-12-05 16:41:46] glpiphplog.ERROR: Toolbox::userErrorHandlerNormal() in /var/www/html/glpi/inc/toolbox.class.php line 657
  *** PHP Notice(8): Undefined index: GLPI
  Backtrace :
  inc/user.class.php:4664
  inc/central.class.php:161                          User::checkDefaultPasswords()
  inc/central.class.php:82                           Central::showMyView()
  inc/commonglpi.class.php:488                       Central::displayTabContentForItem()
  ajax/common.tabs.php:92                            CommonGLPI::displayStandardTab()
  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.012\", 2.95Mio)"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_db Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan"}
[2018-12-05 16:41:46] glpiphplog.DEBUG: Config::getCache() in /var/www/html/glpi/inc/config.class.php line 2981
CACHE cache_trans Zend\Cache\Storage\Adapter\Apc  {"user":"382@Srvsupport01.mondomaine.lan","mem_usage":"0.003\", 1.81Mio)"}

Offline

Board footer

Powered by FluxBB