Skip to content

Commit

Permalink
* admin: check if the apcu extension is loaded and the apc.enabled op…
Browse files Browse the repository at this point in the history
…tion is enabled.
  • Loading branch information
fireware committed Jun 4, 2024
1 parent 1a6ce69 commit 0bd586c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/admin/control.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,8 @@ public function cache()
{
if($_POST)
{
if(!helper::isAPCuEnabled()) return $this->send(array('result' => 'fail', 'message' => $this->lang->admin->apcuNotFound));
if(!extension_loaded('apcu')) return $this->send(array('result' => 'fail', 'message' => $this->lang->admin->apcuNotLoaded));
if(!ini_get('apc.enabled')) return $this->send(array('result' => 'fail', 'message' => $this->lang->admin->apcuNotEnabled));

$cache = form::data()->get();
$this->loadModel('setting')->setItem('system.common.global.cache', json_encode($cache));
Expand Down

0 comments on commit 0bd586c

Please sign in to comment.