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

[Freemius SDK 2.7.1] PHP Fatal error: Uncaught Error: Call to a member function is_expired() on bool using #707

Closed
codex-m opened this issue Apr 23, 2024 · 3 comments · Fixed by #708

Comments

@codex-m
Copy link

codex-m commented Apr 23, 2024

🐞 bug report

Behavior:

  • What is the issue? (*)
While testing Freemius SDK 2.7.1 - we noticed there is a new fatal error when user activates the product and optin to Freemius (by clicking "Allow and Continue"). I think this issue is critical because even free user ignores this (by refreshing or navigating away from the Account page). The same error occurs again after user purchase (right after checkout) when user is redirected back to Account. This can confuse new customers and even give them poor user experience.

This is not reproducible with Freemius SDK 2.7.0.

Steps to reproduce:

  1. Create blank /fresh installed WordPress site with a user email not yet registered or associated with Freemius.
  2. Activate a Freemius powered plugin using SDK 2.7.1 (e.g. the latest Prime Mover FREE 1.9.9-beta6)
  3. In the opt-in dialog click "Allow and Continue" to optin.
  4. While it waits the email to be received - click on "Account" (this is accessible in Prime Mover -> Account).

Actual result: User sees a critical error on account page. It is not accessible.

  • What is the expected behavior?
No fatal error - user can still see the Account page.

Versions: (*)

  • Freemius SDK Version: 2.7.1
  • WordPress Version: 6.5.2
  • PHP Version: 7.4 (and also reproducible even with PHP 8.1)

Plugin / Theme: (*)

  • Name: Prime Mover
  • Slug: prime-mover
  • Freemius ID: 3826

Additional Information:

  • Browser Type: (*) Any
  • Browser Version: (*) n/a
  • OS: (*) Linux and also reproducible with Windows using Local by Flywheel
  • Stack Traces:
    23-Apr-2024 13:18:59 UTC] PHP Fatal error: Uncaught Error: Call to a member function is_expired() on bool in /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php:21352

Stack trace:
#0 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(21093): Freemius->_sync_plugin_license()
#1 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(6755): Freemius->_sync_license()
#2 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(6667): Freemius->_sync_cron_method()
#3 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(6737): Freemius->execute_cron()
#4 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(6720): Freemius->_sync_cron()
#5 /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php(23410) in /home/emerson/sourcecode/testplatform/wp-content/plugins/prime-mover/freemius/includes/class-freemius.php on line 21352


Note: (*) indicates required information. Without this information, your issue may be auto-closed.

You can find your Freemius SDK version at /freemius/start.php

You can find your Freemius product ID in the Freemius dashboard: SETTINGS -> INTEGRATION.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

@flowdee
Copy link

flowdee commented Apr 24, 2024

Indeed, a critical one which holds us back, updating our plugins with v2.7.1. Waiting for a fix @swashata

@swashata
Copy link
Contributor

Thank you for reporting. @DanieleAlessandra would be working on it.

@DanieleAlessandra
Copy link
Collaborator

This should solve the issue
#708

Please give me a feedback

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 a pull request may close this issue.

4 participants