pluginsGLPI / barcode

GNU Affero General Public License v3.0
36 stars 34 forks source link

Remove calling to a parent that does not exists #57

Closed cedric-anne closed 4 years ago

cedric-anne commented 4 years ago

On PHP 7.4, following deprecation message is triggered when trying to use plugin massive actions: PHP Deprecated function: Cannot use "parent" when current class scope has no parent in /var/www/glpi/plugins/barcode/inc/qrcode.class.php at line 332 PHP Deprecated function: Cannot use "parent" when current class scope has no parent in /var/www/glpi/plugins/barcode/inc/qrcode.class.php at line 353 PHP Deprecated function: Cannot use "parent" when current class scope has no parent in /var/www/glpi/plugins/barcode/inc/qrcode.class.php at line 418

Indeed, PluginBarcodeBarcode and PluginBarcodeQRcode have no parent class.

cedric-anne commented 4 years ago

I think it would be better that those classes should extends CommonGLPI

These methods are declared in CommonDBTM, not in CommonGLPI, and these classes are not related to any DB item.