Skip to content

Commit

Permalink
Fix sql env
Browse files Browse the repository at this point in the history
  • Loading branch information
zonky2 committed Jan 27, 2025
1 parent f7b3f17 commit 88b4042
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Filter/Setting/CustomSql.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

namespace MetaModels\Filter\Setting;

use ContaoCommunityAlliance\DcGeneral\Contao\RequestScopeDeterminator;
use Contao\InsertTags;
use Contao\System;
use Doctrine\DBAL\Connection;
Expand Down Expand Up @@ -155,12 +154,12 @@ public function get($strKey)
*/
public function prepareRules(IFilter $objFilter, $arrFilterUrl)
{
$scopeMatcher = System::getContainer()?->get('cca.dc-general.scope-matcher');
$scopeMatcher = System::getContainer()->get('cca.dc-general.scope-matcher');

$useOnlyAtEnv = $this->get('use_only_in_env') ?? false;
$useOnlyAtEnv = $this->get('use_only_in_env') ?? '';

if (
false === $useOnlyAtEnv
'' === $useOnlyAtEnv
|| (
('only_backend' === $useOnlyAtEnv && null !== $scopeMatcher && $scopeMatcher->currentScopeIsBackend())
|| (
Expand Down

0 comments on commit 88b4042

Please sign in to comment.