Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n_themes is not properly primed in global_arrays.php #2191

Closed
justmace opened this issue Nov 29, 2018 · 1 comment
Closed

i18n_themes is not properly primed in global_arrays.php #2191

justmace opened this issue Nov 29, 2018 · 1 comment

Comments

@justmace
Copy link

Hi,

There's a problem trying to upgrade the database:

[root@localhost cacti]# php cli/upgrade_database.php --forcever='1.1.38'
PHP Fatal error:  Uncaught Error: Call to undefined function _() in /usr/share/nginx/html/cacti/include/global_arrays.php:1718
Stack trace:
#0 /usr/share/nginx/html/cacti/include/global.php(396): include_once()
#1 /usr/share/nginx/html/cacti/include/cli_check.php(33): include('/usr/share/ngin...')
#2 /usr/share/nginx/html/cacti/cli/upgrade_database.php(26): require('/usr/share/ngin...')
#3 {main}
  thrown in /usr/share/nginx/html/cacti/include/global_arrays.php on line 1718

Fatal error: Uncaught Error: Call to undefined function _() in /usr/share/nginx/html/cacti/include/global_arrays.php:1718
Stack trace:
#0 /usr/share/nginx/html/cacti/include/global.php(396): include_once()
#1 /usr/share/nginx/html/cacti/include/cli_check.php(33): include('/usr/share/ngin...')
#2 /usr/share/nginx/html/cacti/cli/upgrade_database.php(26): require('/usr/share/ngin...')
#3 {main}
  thrown in /usr/share/nginx/html/cacti/include/global_arrays.php on line 1718

Checked global_arrays.php

$i18n_themes = array(
	_('Classic'),
	_('Modern'),
	_('Dark'),
	_('Paper-plane'),
	_('Paw'),
	_('Sunrise'),
);

should be

$i18n_themes = array(
        __('Classic'),
        __('Modern'),
        __('Dark'),
        __('Paper-plane'),
        __('Paw'),
        __('Sunrise'),
);

This is the result after applying the changes

[root@localhost cli]# php upgrade_database.php --forcever='1.1.38'
Upgrading from v1.1.38
Upgrading from v1.1.38 (DB 1.2.0) to v1.2.0
++++++++++++++-+++++++++++++++++++++

@netniV netniV changed the title Failed upgrade database: missing underscore in global_arrays.php i18n_themes is not properly primed in global_arrays.php Nov 29, 2018
netniV added a commit that referenced this issue Nov 29, 2018
@netniV
Copy link
Member

netniV commented Nov 29, 2018

Good catch. Thanks!

This has now been committed to the development code.

@netniV netniV closed this as completed Nov 29, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants