Skip to content

Commit 655e057

Browse files
committedJan 6, 2025
Fix empty closure
1 parent c8d85a0 commit 655e057

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎php-templates/auth.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
$policyClass = null;
88

9-
if (get_class($reflection->getClosureThis()) === Illuminate\Auth\Access\Gate::class) {
9+
$closureThis = $reflection->getClosureThis();
10+
if ($closureThis && get_class($closureThis) === Illuminate\Auth\Access\Gate::class) {
1011
$vars = $reflection->getClosureUsedVariables();
1112

1213
if (isset($vars['callback'])) {

0 commit comments

Comments
 (0)
Please sign in to comment.