mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 03:02:45 +08:00
Only do time comparison if setting is numeric
This commit is contained in:
parent
2dd8514d62
commit
607132a68f
|
@ -125,7 +125,7 @@ class DiscussionPolicy extends AbstractPolicy
|
|||
|
||||
if ($allowEditTags === '-1'
|
||||
|| ($allowEditTags === 'reply' && $discussion->participants_count <= 1)
|
||||
|| ($discussion->start_time->diffInMinutes(new Carbon) < $allowEditTags)
|
||||
|| (is_numeric($allowEditTags) && $discussion->start_time->diffInMinutes(new Carbon) < $allowEditTags)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user