fix: license key warning no longer shows during uninstall
Check if com_mokosuitecross is still in #__extensions before warning about missing license key. Prevents the warning from firing during package uninstall when the update site row is already deleted.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
- **Medium**: Fixed getUserId() returning array instead of string on error
|
||||
- **Bluesky**: Replaced md5() with hash('sha256', ...) for cache key
|
||||
- **ServiceController**: Exception details no longer exposed to client
|
||||
- **License warning**: No longer shows during extension uninstall when component is being removed
|
||||
|
||||
## [01.04.01] --- 2026-06-21
|
||||
|
||||
|
||||
@@ -117,6 +117,19 @@ class MokoSuiteCross extends CMSPlugin implements SubscriberInterface
|
||||
try {
|
||||
$db = Factory::getDbo();
|
||||
|
||||
// Don't warn if the component is not installed (e.g. during uninstall)
|
||||
$componentExists = $db->setQuery(
|
||||
$db->getQuery(true)
|
||||
->select('COUNT(*)')
|
||||
->from($db->quoteName('#__extensions'))
|
||||
->where($db->quoteName('type') . ' = ' . $db->quote('component'))
|
||||
->where($db->quoteName('element') . ' = ' . $db->quote('com_mokosuitecross'))
|
||||
)->loadResult();
|
||||
|
||||
if (!$componentExists) {
|
||||
return;
|
||||
}
|
||||
|
||||
$query = $db->getQuery(true)
|
||||
->select($db->quoteName('extra_query'))
|
||||
->from($db->quoteName('#__update_sites'))
|
||||
|
||||
Reference in New Issue
Block a user