diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php index 7baec62e..34199c81 100755 --- a/app/Controller/AppController.php +++ b/app/Controller/AppController.php @@ -589,6 +589,7 @@ public function __initSeoConfiguration() $this->loadModel('Seo'); $default = $this->Seo->find('first', ["conditions" => ['page' => null]])['Seo']; $current_url = $this->here; + $current_url = str_replace("'", "\'", $current_url); $get_page = []; $condition = ["'" . $current_url . "' LIKE CONCAT(page, '%')"]; diff --git a/app/Model/Maintenance.php b/app/Model/Maintenance.php index e711b868..5ee6f1a8 100644 --- a/app/Model/Maintenance.php +++ b/app/Model/Maintenance.php @@ -4,6 +4,7 @@ class Maintenance extends AppModel { function checkMaintenance($url, $utilComponent) { + $url = str_replace("'", "\'", $url); $use_sqlite = $utilComponent->useSqlite(); $condition = ["'" . $url . "' LIKE CONCAT(Maintenance.url, '%')", "active" => 1]; @@ -29,4 +30,4 @@ function isFullMaintenance() $result = $result["Maintenance"]; return $result; } -} \ No newline at end of file +}