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 2015-06-16 14:47:01

bmichelsz
Member
From: Slovakia
Registered: 2007-10-20
Posts: 37

Plugin appliance 2.0.0

Dear all,
after upgrade to GLPI version 0.85.4 I tried to upgrade an appliance plugin version 1.9.1 to version 2.0.0 but without success
During upgrade the following error appeared on screen:

Update: Appliances
PHP Notice: Undefined variable: DB in path-to-webserver\glpi\plugins\appliances\inc\appliance.class.php at line 972
Fatal error: Call to a member function request() on a non-object in path-to-webserver\glpi\plugins\appliances\inc\appliance.class.php on line 972

and in php-errors.log file:

  *** PHP Notice(8): Undefined variable: DB
  Backtrace :
  plugins\appliances\inc\appliance.class.php:972     
  plugins\appliances\hook.php:243                    PluginAppliancesAppliance::updateSchema()
  inc\plugin.class.php:639                           plugin_appliances_install()
  front\plugin.form.php:45                           Plugin->install()

I am not a PHP programmer, but I think that a variable definition (global $DB) is missing in function body

static function updateSchema(Migration $migration) {

on line 938
   
appliance.tar.gz was downloaded from nightly build 16.6.2015

Please confirm and/or fix.

Thank you.
Regards.

MiB


Debian 11, GLPI 10.0.6, OCS 2.3.1, MariaDB 10.5.18, Apache 2.4.52, PHP 7.4.33

Offline

#2 2015-06-30 20:45:56

blerohellec
Member
From: Paris
Registered: 2015-04-08
Posts: 84

Re: Plugin appliance 2.0.0

I confirm. I tested the GLPI upgrade from 0.84.8 to 0.85.4 and plugin appliance from 1.9.0 to 2.0.0. And I get the same error (the plugin upgrade blocks on the notepad migration).
Add "global $DB;" at the beginning of the function, and it works fine.

I create an issue in the plugin forge.


Benoit Le Rohellec
blerohellec@tlsconsulting.eu
www.tlsconsulting.eu

Offline

#3 2015-10-15 16:01:08

Megachip
Member
Registered: 2014-05-02
Posts: 109

Re: Plugin appliance 2.0.0

Same here. But afair there are some more reported malfunctions? Something with search?

Offline

Board footer

Powered by FluxBB