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

Update Paginator.php #4208

Closed
wants to merge 1 commit into from
Closed

Update Paginator.php #4208

wants to merge 1 commit into from

Conversation

wei2go
Copy link

@wei2go wei2go commented May 2, 2019

This Query class doesn't seem to be used in this file, and is causing this weird intermittent error: "PHP Compile Error – yii\base\ErrorException, Cannot use yii\db\Query as Query because the name is already in use." Error happens when using {% paginate %} in Twig template.

Since this class is not really in use in this file, can you consider removing it?

This Query class doesn't seem to be used in this file, and is causing this weird intermittent error: "PHP Compile Error – yii\base\ErrorException, Cannot use yii\db\Query as Query because the name is already in use." Error happens when using {% paginate %} in Twig template.
@brandonkelly
Copy link
Member

Thanks for pointing that out! The class was being referenced, but only by a PHP comment, so I’ve namespace it instead.

Strange that it would only intermittently cause an issue. Are you running different versions of PHP on different servers perhaps?

@wei2go
Copy link
Author

wei2go commented May 3, 2019

Hi Brandon,

Thanks for fixing this.

The reason I said it was intermittent is because I was trying to debug it, and then it fixed by itself after I rolled back all my debugging efforts. So I guess there could be some cache thing? But I don't cache the pagination part of template though. Weird. Anyway...

@brandonkelly
Copy link
Member

Hm yeah maybe an OPcache thing or something, not sure!

angrybrad pushed a commit that referenced this pull request May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants