Added missing default statement in switch case (#653)

This commit is contained in:
Roman Kelesidis 2023-03-26 16:00:38 +07:00 committed by GitHub
commit 4d496ba645
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 1 deletions

View file

@ -132,6 +132,9 @@ switch ($mode) {
<td>' . $user_ratio . '</td> <td>' . $user_ratio . '</td>
'; ';
break; break;
default:
$this->ajax_die('Invalid mode');
} }
$this->response['html'] = $html; $this->response['html'] = $html;

View file

@ -110,6 +110,9 @@ switch ($mode) {
$this->response['unlock_cron_html'] = '<span class="seed bold">' . $lang['ADMIN_UNLOCKED'] . '</span>'; $this->response['unlock_cron_html'] = '<span class="seed bold">' . $lang['ADMIN_UNLOCKED'] . '</span>';
break; break;
default:
$this->ajax_die('Invalid mode');
} }
$this->response['mode'] = $mode; $this->response['mode'] = $mode;

View file

@ -104,6 +104,9 @@ switch ($mode) {
$this->response['info'] = $lang['USER_ACTIVATE_OFF']; $this->response['info'] = $lang['USER_ACTIVATE_OFF'];
break; break;
default:
$this->ajax_die('Invalid mode');
} }
$this->response['mode'] = $mode; $this->response['mode'] = $mode;

View file

@ -133,4 +133,7 @@ switch ($mode) {
</table><br /> </table><br />
'; ';
break; break;
default:
$this->ajax_die('Invalid mode');
} }

View file

@ -44,6 +44,9 @@ switch ($mode) {
$html = '<img src="./styles/images/good.gif"> <span class="seedmed bold">' . $text . '</span>'; $html = '<img src="./styles/images/good.gif"> <span class="seedmed bold">' . $text . '</span>';
} }
break; break;
default:
$this->ajax_die('Invalid mode');
} }
$this->response['html'] = $html; $this->response['html'] = $html;

View file

@ -71,7 +71,8 @@ class Caches
$this->ref[$cache_name] =& $this->obj[$cache_name]; $this->ref[$cache_name] =& $this->obj[$cache_name];
break; break;
default: //filecache case 'filecache':
default:
if (!isset($this->obj[$cache_name])) { if (!isset($this->obj[$cache_name])) {
$this->obj[$cache_name] = new Cache\File($this->cfg['db_dir'] . $cache_name . '/', $this->cfg['prefix']); $this->obj[$cache_name] = new Cache\File($this->cfg['db_dir'] . $cache_name . '/', $this->cfg['prefix']);
} }