DB BaseBuilder Join() - RawSql as table #9070
Labels
database
Issues or pull requests that affect the database layer
enhancement
PRs that improve existing functionalities
PHP Version
8.2
CodeIgniter4 Version
4.5.3
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
CRITICAL - 2024-07-24 14:10:15 --> TypeError: CodeIgniter\Database\BaseBuilder::join(): Argument #1 ($table) must be of type string, CodeIgniter\Database\RawSql given, called in C:\xampp\portal\vendor\codeigniter4\framework\system\Model.php on line 930
[Method: GET, Route: public/fuel/pricing/getprice]
in SYSTEMPATH\Database\BaseBuilder.php on line 620.
1 SYSTEMPATH\Model.php(930): CodeIgniter\Database\BaseBuilder->join(Object(CodeIgniter\Database\RawSql), 't5.product_id =
fpp
.id', 'inner')Steps to Reproduce
Used to be able to use RawSql for table on join()
Expected Output
Get errors now.
Fix by adding adding RawSq type:
Adding is_string($table) twice in BaseBuilder::trackAliases()
Anything else?
I'd send in a PR but I'm slammed busy at the moment and I don't have my development environment ready.
The text was updated successfully, but these errors were encountered: