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

Infinite loop #757

Open
LC43 opened this issue Nov 10, 2024 · 0 comments
Open

Infinite loop #757

LC43 opened this issue Nov 10, 2024 · 0 comments

Comments

@LC43
Copy link

LC43 commented Nov 10, 2024

🐞 bug report

Behavior:

  • What is the issue? (*)

_sync_plans() has an infinite loop.

I found this issue when i used 'is_premium_only' => false, on an addon, it goes into a loop and does a timeout. But there are other use cases.

EDIT: this happens if the plans are not released to the Users, so its a edge case 😅

my findings is that it happens in __sync_plans() . It will call

    $missing_plan = self::_get_plan_by_id( $plan_id );

which in turn have this condition

    if ( ! is_array( $this->_plans ) || 0 === count( $this->_plans ) ) {
        $this->_sync_plans();
    }
  • What is the expected behavior?

not entering the infinite loop.

Versions: (*)

  • Freemius SDK Version: 2.9.0, but tested with 2.7.2 and still happens
  • WordPress Version: 6.6.0
  • PHP Version: 8.3.11

Plugin / Theme: (*)

  • Name: Interactive Globes Extended Sources Addon
  • Slug: interactive-globes-extended-sources
  • Freemius ID: 16680

Additional Information:

  • Browser Type: (*) not related
  • Browser Version: (*) not related
  • OS: (*) not related
  • Stack Traces:
@LC43 LC43 closed this as completed Nov 10, 2024
@LC43 LC43 reopened this Nov 11, 2024
@LC43 LC43 changed the title 'is_premium_only' => false breaks site Infinite loop Nov 11, 2024
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

No branches or pull requests

1 participant