codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.4k stars 1.9k forks source link

Bug: Calling the base_url() from the cli results into assert($currentURI instanceof SiteURI) #8059

Closed pietos closed 1 year ago

pietos commented 1 year ago

PHP Version

8.1

CodeIgniter4 Version

4.4.1

CodeIgniter4 Installation Method

Manual (zip or tar.gz)

Which operating systems have you tested for this bug?

Windows

Which server did you use?

apache

Database

MariaDB 10.2

What happened?

Since I upgraded to 4.4.1 I can't use the base_url() anymore from the CLI. I verified this in multiple projects and it all results into:

[AssertionError]

assert($currentURI instanceof SiteURI)

at SYSTEMPATH\Helpers\url_helper.php:52

Similar to this issue: https://forum.codeigniter.com/showthread.php?tid=88410

Steps to Reproduce

Expected Output

The base_url as a string

Anything else?

No response

kenjis commented 1 year ago

It was fixed by #7901. Try the latest develop branch.