CodeIgniter4
CodeIgniter4 copied to clipboard
fix: Response::download() causes TypeError
Description Fixes #6358
How to Test
<?php
namespace App\Controllers;
class Home extends BaseController
{
public function index()
{
return $this->response->download('some.txt', 'some text', true);
}
}
Checklist:
- [x] Securely signed commits
- [] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [x] Conforms to style guide
Should RedirectResponse be checked? Also, I think null is an acceptable body for some API responses - we might need to check or cast that.
Hi, same problem here, just testedkenjis fix and works fine.
Changed the implementation.
Any ideas how this made it through tests to release?