1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 00:02:18 +02:00

[ticket/17480] Catch runtime_exception instead of exception_interface

Catch runtime_exception instead of exception_interface
for extensions version check failures.

PHPBB-17480
This commit is contained in:
rxu 2025-03-04 01:06:46 +07:00
parent 7fd634b420
commit d9136469ea
No known key found for this signature in database
GPG Key ID: 955F0567380E586A

View File

@ -12,6 +12,7 @@
*/
use phpbb\exception\exception_interface;
use phpbb\exception\runtime_exception;
use phpbb\exception\version_check_exception;
/**
@ -344,7 +345,7 @@ class acp_extensions
$this->template->assign_block_vars('updates_available', $updates_available);
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
@ -423,7 +424,7 @@ class acp_extensions
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
// Ignore exceptions due to the version check
}
@ -433,7 +434,7 @@ class acp_extensions
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('disabled', array(
@ -501,7 +502,7 @@ class acp_extensions
{
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('disabled', array(
@ -572,7 +573,7 @@ class acp_extensions
{
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
}
catch (exception_interface $e)
catch (runtime_exception $e)
{
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
$this->template->assign_block_vars('not_installed', array(