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 2020-06-08 17:23:37

bertrandjp
Member
Registered: 2020-06-08
Posts: 2

array_key_exists() error with Zend

* GLPI 9.2.2
* PHP 7.4.1
* MYSQL (latest)
*Windows server 2019
* IIS 10

No plugins installed

GLPI hangs for few minutes and crashes. See error log below...

_______________________________________________________

2020-06-08 11:07:56 [2@KLADNO]
  *** PHP Deprecated function(8192): array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
  Backtrace :
  :                                                 
  ...zend-i18n\src\Translator\Loader\Gettext.php:142 array_key_exists()
  ...ork\zend-i18n\src\Translator\Translator.php:720 Zend\I18n\Translator\Loader\Gettext->load()
  ...ork\zend-i18n\src\Translator\Translator.php:592 Zend\I18n\Translator\Translator->loadMessagesFromFiles()
  ...ork\zend-i18n\src\Translator\Translator.php:442 Zend\I18n\Translator\Translator->loadMessages()
  ...ork\zend-i18n\src\Translator\Translator.php:356 Zend\I18n\Translator\Translator->getTranslatedMessage()
  inc\autoload.function.php:115                      Zend\I18n\Translator\Translator->translate()
  inc\crontask.class.php:813                         __()
  front\cron.php:65                                  CronTask::launch()

Offline

#2 2020-06-08 18:37:13

bertrandjp
Member
Registered: 2020-06-08
Posts: 2

Re: array_key_exists() error with Zend

I modify line 142 in
\glpi\vendor\zendframework\zend-i18n\src\Translator\Loader\gettext.php

// if (array_key_exists('', $textDomain)) { *** line replaced ***
    if (isset($textDomain)) {

It's probably not the best modification but it seems to work (or bypass the problem)

Offline

Board footer

Powered by FluxBB