File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class Application extends \WpStarter\Foundation\Application
1111 *
1212 * @var string
1313 */
14- const VERSION = '1.9.2 ' ;
14+ const VERSION = '1.9.3 ' ;
1515
1616 protected $ bootstrappedList = [];
1717
Original file line number Diff line number Diff line change 44
55use WpStarter \Contracts \Foundation \Application ;
66use WpStarter \Foundation \Http \Kernel as HttpKernel ;
7+ use WpStarter \Http \Request ;
78use WpStarter \Routing \Pipeline ;
89use WpStarter \Routing \Router ;
10+ use WpStarter \Support \Facades \Facade ;
911use WpStarter \Wordpress \Routing \Router as ShortcodeRouter ;
1012
1113class Kernel extends HttpKernel
@@ -89,7 +91,7 @@ function registerWpHandler($request)
8991 $ hook =(array )$ this ->wpHandleHook ;
9092 add_action ($ hook [0 ]??'template_redirect ' , function ()use ($ request ) {
9193 if ($ request ->isNotFoundHttpExceptionFromRoute ()) {
92- $ this ->handleWp ($ request , true );
94+ $ this ->handleWp (Request:: capture () , true );
9395 }
9496 }, $ hook [1 ]??1 );
9597 }
@@ -126,6 +128,10 @@ function handleWp($request, $processResponse=false)
126128 */
127129 protected function wpSendRequestThroughRouter ($ request )
128130 {
131+ $ this ->app ->instance ('request ' , $ request );
132+
133+ Facade::clearResolvedInstance ('request ' );
134+
129135 return (new Pipeline ($ this ->app ))
130136 ->send ($ request )
131137 ->through ($ this ->app ->shouldSkipMiddleware () ? [] : $ this ->middleware )
You can’t perform that action at this time.
0 commit comments