FreePBX / framework

This module provides a facility to install bug fixes to the framework code that is not otherwise housed in a module
http://www.freepbx.org
GNU General Public License v3.0
64 stars 61 forks source link

If a module has been disabled and has an uninstall() method, then uninstalling generates an error #140

Open Stevehans opened 3 months ago

Stevehans commented 3 months ago

FreePBX Version

FreePBX 17

Issue Description

Attempting to uninstall a module with an uninstall method from module admin after a module has been disabled results in an error as the module cannot be instantiated.

Not sure whether the uninstall option should be disabled if the module isn't enabled, or whether there needs to be a special case to allow the module to be instantiated when disabled purely for the purpose of calling the uninstall method?

Operating Environment

17.0.16

Relevant log output

Error Returned was: Unable to locate the FreePBX BMO Class 'myModule'
A required module might be disabled or uninstalled. 
Recommended steps (run from the CLI): 
1) fwconsole ma install myModule
2) fwconsole ma enable myModule
kguptasangoma commented 3 months ago

Freepbx 16 also behaving the same so does not looks like php 8.2 compatibility issue. thanks