8000 修复 EloquentRepository::getRelationInputs() 未校验方法公开性的问题 by oopok · Pull Request #1931 · jqhph/dcat-admin · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

修复 EloquentRepository::getRelationInputs() 未校验方法公开性的问题 #1931

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 1 commit into from
Nov 19, 2022
Merged
Changes from all commits
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
3 changes: 2 additions & 1 deletion src/Repositories/EloquentRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use ReflectionMethod;
use Spatie\EloquentSortable\Sortable;

class EloquentRepository extends Repository implements TreeRepository
Expand Down Expand Up @@ -782,7 +783,7 @@ protected function getRelationInputs($model, $inputs = [])
$relationColumn = $camelColumn;
}

if (! $relationColumn) {
if (! $relationColumn || ! (new ReflectionMethod($model, $relationColumn))->isPublic()) {
continue;
}

Expand Down
0