From 0549aa70f8632e612ef9b460edee8bcbb94414fc Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Tue, 27 May 2025 14:34:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A8=80=E8=AA=9E=E3=83=91=E3=83=A9?= =?UTF-8?q?=E3=83=A1=E3=83=BC=E3=82=BFlang=E3=81=ABja,en=E4=BB=A5=E5=A4=96?= =?UTF-8?q?=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=9F=E5=A0=B4=E5=90=88?= =?UTF-8?q?=E3=80=81=E3=81=9D=E3=81=AE=E6=9D=A1=E4=BB=B6=E3=81=A7=E3=82=AF?= =?UTF-8?q?=E3=82=A8=E3=83=AA=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=81=9F?= =?UTF-8?q?=E3=82=81=E3=80=81=E3=82=AD=E3=83=A3=E3=83=83=E3=82=B7=E3=83=A5?= =?UTF-8?q?=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB=E3=81=8C=E8=82=A5=E5=A4=A7?= =?UTF-8?q?=E5=8C=96=E3=81=99=E3=82=8B=E3=80=82=20ja,en=E4=BB=A5=E5=A4=96?= =?UTF-8?q?=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=95=E3=82=8C=E3=81=9F=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AF=E3=80=81=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB?= =?UTF-8?q?=E3=83=88=E5=80=A4=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller/NetCommonsAppController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Controller/NetCommonsAppController.php b/Controller/NetCommonsAppController.php index 01914da7..86ed9cca 100644 --- a/Controller/NetCommonsAppController.php +++ b/Controller/NetCommonsAppController.php @@ -306,6 +306,10 @@ public function afterFilter() { protected function _setLanguage() { if (isset($this->request->query['lang']) && ! array_key_exists('search', $this->request->query)) { + if (!is_string($this->request->query['lang']) || + !in_array($this->request->query['lang'], ['ja', 'en'], true)) { + $this->request->query['lang'] = Configure::read('Config.language'); + } Configure::write('Config.language', $this->request->query['lang']); $this->Session->write('Config.language', $this->request->query['lang']);