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 2016-09-27 09:47:00

Bruce79
Member
Registered: 2012-05-23
Posts: 34

9.1? Call to undefined function _() in html.class.php on line 569

We just upgraded to 9.1 (Upgrade went fine)

But we have an issue that sometimes the screen stays blank (we see the menu bar, but nothing else)

While investigating I checked the php error log ...
And I saw a lot of these (starting from the upgrade):

\inc\html.class.php on line 569

[27-Sep-2016 09:32:49 Europe/Brussels] PHP Fatal error:  Call to undefined function _() in C:\etc\www\inc\html.class.php on line 569
[27-Sep-2016 09:32:53 Europe/Brussels] PHP Fatal error:  Call to undefined function _() in C:\etc\www\inc\html.class.php on line 569
[27-Sep-2016 09:32:56 Europe/Brussels] PHP Fatal error:  Call to undefined function _() in C:\etc\www\inc\html.class.php on line 569
[27-Sep-2016 09:33:24 Europe/Brussels] PHP Fatal error:  Call to undefined function _() in C:\etc\www\inc\html.class.php on line 569

When checking  C:\etc\www\inc\html.class.php  lines 558 till 572:

            //set title and css class
            switch ($msgtype) {
               case ERROR:
                  $title = _('Error');
                  $class = 'err_msg';
                  break;
               case WARNING:
                  $title = _('Warning');
                  $class = 'warn_msg';
                  break;
               case INFO:
                  $title = _('Information');
                  $class = 'info_msg';
                  break;
            }

So, anybody an idea ??? I assume _ should be an function ...

Offline

#2 2016-09-28 07:30:23

scorpz
Member
Registered: 2012-10-09
Posts: 13

Re: 9.1? Call to undefined function _() in html.class.php on line 569

Same problem and its really disturbing as in RC this was not the issue.

Offline

#3 2016-09-28 18:05:43

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

Re: 9.1? Call to undefined function _() in html.class.php on line 569

Can you give me the complete log in 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

#4 2016-09-29 09:41:06

scorpz
Member
Registered: 2012-10-09
Posts: 13

Re: 9.1? Call to undefined function _() in html.class.php on line 569

Offline

#5 2016-10-04 16:49:10

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

Re: 9.1? Call to undefined function _() in html.class.php on line 569

It's a problem of gettext. Correction done https://github.com/glpi-project/glpi/issues/1116
but getetxt must be regenerated to be useful (translation done)


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

#6 2016-10-07 10:10:02

mjh
Member
Registered: 2016-10-07
Posts: 1

Re: 9.1? Call to undefined function _() in html.class.php on line 569

In file  \etc\www\inc\html.class.php  lines 558 till 572
falsely a single underscore '_' instead of double underscore '__' is used.
The double '__' is used for Localization.

            //set title and css class
            switch ($msgtype) {
               case ERROR:
                  $title = __('Error'); // __( instead of _(
                  $class = 'err_msg';
                  break;
               case WARNING:
                  $title = __('Warning'); // __( instead of _(
                  $class = 'warn_msg';
                  break;
               case INFO:
                  $title = __('Information');// __( instead of _(
                  $class = 'info_msg';
                  break;
            }


Addition: I noticed it's already fixed in https://github.com/glpi-project/glpi/bl … .class.php as reported in the previous entry of GLPI-DEV

Last edited by mjh (2016-10-07 10:52:20)

Offline

Board footer

Powered by FluxBB