diff --git a/extensions/tags/src/Listeners/AddTagGambit.php b/extensions/tags/src/Listeners/AddTagGambit.php index c642189f1..2ebd0a4a2 100755 --- a/extensions/tags/src/Listeners/AddTagGambit.php +++ b/extensions/tags/src/Listeners/AddTagGambit.php @@ -33,7 +33,7 @@ class AddTagGambit return $query->select(app('flarum.db')->raw(1)) ->from('discussions_tags') ->whereIn('tag_id', Tag::where('is_hidden', 1)->lists('id')) - ->whereRaw('discussion_id = discussions.id'); + ->whereRaw('discussion_id = ' . app('flarum.db')->getQueryGrammar()->wrap('discussions.id')); }); } } diff --git a/extensions/tags/src/Listeners/ConfigureDiscussionPermissions.php b/extensions/tags/src/Listeners/ConfigureDiscussionPermissions.php index 821aecb8e..e2f2a577f 100755 --- a/extensions/tags/src/Listeners/ConfigureDiscussionPermissions.php +++ b/extensions/tags/src/Listeners/ConfigureDiscussionPermissions.php @@ -21,7 +21,7 @@ class ConfigureDiscussionPermissions return $query->select(app('flarum.db')->raw(1)) ->from('discussions_tags') ->whereIn('tag_id', Tag::getNotVisibleTo($event->actor)) - ->whereRaw('discussion_id = discussions.id'); + ->whereRaw('discussion_id = ' . app('flarum.db')->getQueryGrammar()->wrap('discussions.id')); }); } }