8000 [9.x] Fix postgresql build by driesvints · Pull Request #39531 · laravel/framework · GitHub
[go: up one dir, main page]

Skip to content

[9.x] Fix postgresql build #39531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 16, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
driesvints committed Nov 8, 2021
commit 1bb9be77e79aeb9a67c2312e64b1cc6b98f25fb8
6 changes: 4 additions & 2 deletions src/Illuminate/Database/Schema/PostgresBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,16 @@ protected function parseSearchPath($searchPath)
$searchPath = $matches[0];
}

array_walk($searchPath ?? [], function (&$schema) {
$searchPath = $searchPath ?? [];

array_walk($searchPath, function (&$schema) {
$schema = trim($schema, '\'"');

$schema = $schema === '$user'
? $this->connection->getConfig('username')
: $schema;
});

return $searchPath ?? [];
return $searchPath;
}
}
0