From 049d94dd3bb565362c3443abe99e7f1ca07cd891 Mon Sep 17 00:00:00 2001 From: Simon Geoghegan Date: Wed, 27 Nov 2024 17:51:15 +0800 Subject: [PATCH] No longer appending booted callbacks when the application has already booted --- src/Illuminate/Foundation/Application.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index c87e4004f097..6f1a2cf5bdbd 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -1143,10 +1143,10 @@ public function booting($callback) */ public function booted($callback) { - $this->bootedCallbacks[] = $callback; - if ($this->isBooted()) { $callback($this); + } else { + $this->bootedCallbacks[] = $callback; } }