Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: FilterTestTrait Undefined Variable #8113

Closed
MGatner opened this issue Oct 28, 2023 · 0 comments · Fixed by #8195
Closed

Bug: FilterTestTrait Undefined Variable #8113

MGatner opened this issue Oct 28, 2023 · 0 comments · Fixed by #8195
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@MGatner
Copy link
Member

MGatner commented Oct 28, 2023

PHP Version

8.1

CodeIgniter4 Version

4.4.3

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MySQL

What happened?

#8058 introduced a scenario where $filterClasses may not be defined.

2) FiltersTest::testNotAuthenticated with data set #0 ('App\Filters\LoginFilter')
ErrorException: Undefined variable $filterClasses

/home/runner/work/web/web/vendor/codeigniter4/framework/system/Test/FilterTestTrait.php:138
/home/runner/work/web/web/tests/misc/FiltersTest.php:60

Steps to Reproduce

    public function testLoginPass()
    {
        session()->set('uid', '54321fedcba');

        $caller = $this->getFilterCaller(LoginFilter::class, 'before');
        $result = $caller();

        $this->assertNull($result);
    }

Expected Output

n/a

Anything else?

I will send a fix up next work window I get.

@MGatner MGatner added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant