[ticket/16019] Amend code for the better

PHPBB3-16019
This commit is contained in:
3D-I 2019-08-13 05:32:02 +02:00
parent af84fb71e0
commit 6cc16af75f

View file

@ -264,12 +264,15 @@ class acp_styles
FROM ' . STYLES_TABLE . "
WHERE style_name = '" . $this->db->sql_escape('prosilver') . "'";
$result = $this->db->sql_query($sql);
$prosilver_id = (int) $this->db->sql_fetchrow($result);
$prosilver_id = (int) $this->db->sql_fetchfield('style_id');
$this->db->sql_freeresult($result);
if (in_array($prosilver_id, $ids))
if ($prosilver_id)
{
trigger_error($this->user->lang['UNINSTALL_PROSILVER'] . adm_back_link($this->u_action), E_USER_WARNING);
if (in_array($prosilver_id, $ids))
{
trigger_error($this->user->lang('UNINSTALL_PROSILVER') . adm_back_link($this->u_action), E_USER_WARNING);
}
}
// Check if confirmation box was submitted