Skip to content

Commit 49a491e

Browse files
committed
improv. remove warnings messages
1 parent 675a6ab commit 49a491e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

app/Controller/AppController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function beforeFilter()
4848
{
4949
// find any xss vulnability on request data
5050
$datas = $this->request->data;
51-
$this->request->data = $this->xssProtection($datas, ['command', 'order', 'broadcast']);
51+
$this->request->data = $this->xssProtection($datas, ['command', 'cmd', 'order', 'broadcast']);
5252
$this->request->data["xss"] = $datas;
5353
// lowercase to avoid errors when the controller is called with uppercase
5454
$this->params['controller'] = strtolower($this->params['controller']);
@@ -553,9 +553,11 @@ public function __initSeoConfiguration()
553553
$default = $this->Seo->find('first', ["conditions" => ['page' => null]])['Seo'];
554554
$current_url = $this->here;
555555
$get_page = [];
556-
$check = max($this->Seo->find('all', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]));
557-
if ($check && ($check['Seo']["page"] == $current_url || $current_url != "/"))
556+
$check = $this->Seo->find('all', ['conditions' => ["'" . $current_url . "' LIKE CONCAT(page, '%')"]]);
557+
558+
if ($check && ($check = max($check)) && ($check['Seo']["page"] == $current_url || $current_url != "/"))
558559
$get_page = $check['Seo'];
560+
559561
$seo_config['title'] = (!empty($default['title']) ? $default['title'] : "{TITLE} - {WEBSITE_NAME}");
560562
$seo_config['title'] = (!empty($get_page['title']) ? $get_page['title'] : $seo_config['title']);
561563
$seo_config['description'] = (!empty($get_page['description']) ? $get_page['description'] : (!empty($default['description']) ? $default['description'] : ""));

0 commit comments

Comments
 (0)