Skip to content

Commit

Permalink
BUGFIX 🐛 Deal correclty with directory separator
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeblauw committed Dec 23, 2024
1 parent 89edfa8 commit 9d2a95c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private function policyCheck(string $ability, ?Model $model = null): void

// If the policy doesn't exist, we can't check it (but issue warning)
$class = $this->config->CLASS;
$policy = 'app\\Policies\\'.class_basename($class).'Policy.php';
$policy = 'app'.DIRECTORY_SEPARATOR.'Policies'.DIRECTORY_SEPARATOR.class_basename($class).'Policy.php';

if (!file_exists(base_path($policy))) {
Log::warning('Policies enabled, but no <strong>'.$policy.'</strong> found for <strong>'.$class.'</strong>.');
Expand Down

0 comments on commit 9d2a95c

Please sign in to comment.