Skip to content

Commit d08b68b

Browse files
committed
Fix in ControllerTester for missing UserAgent when creating a request.
1 parent 4d06fa2 commit d08b68b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

system/Test/ControllerTester.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
*/
3838

3939
use CodeIgniter\HTTP\IncomingRequest;
40+
use CodeIgniter\HTTP\UserAgent;
4041
use CodeIgniter\HTTP\Response;
4142
use CodeIgniter\HTTP\URI;
4243
use Config\App;
@@ -90,7 +91,7 @@ public function controller(string $name)
9091

9192
if (empty($this->request))
9293
{
93-
$this->request = new IncomingRequest($this->appConfig, $this->uri, $this->body);
94+
$this->request = new IncomingRequest($this->appConfig, $this->uri, $this->body, new UserAgent());
9495
}
9596

9697
if (empty($this->response))

0 commit comments

Comments
 (0)