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

Compatibility fixes for PHP 8 and YOURLS 1.9.2 #10

Merged
merged 3 commits into from
Feb 23, 2024
Merged

Conversation

nicwaller
Copy link
Owner

@nicwaller nicwaller commented Feb 22, 2024

What

Introduce a few small but essential fixes for compatibility with PHP 8 and YOURLS 1.9.2

  • check if constant YOURLS_USER is defined before using it
    • Starting with PHP 8, using undefined constants is now a fatal error
    • This again allows the plugin to be used when YOURLS has public shortening enabled
  • check if global domainlimit_exempt_users is an array before using it
    • This avoids a fatal error when $domainlimit_exempt_users is not set in config.php
  • remove use of deprecated function yourls_encodeURI()
    • yourls_encodeURI has been deprecated since 1.9.1
  • remove use of deprecated function yourls_escape()

This fixes #6

Testing

I added a unit test suite in #11 that gets run with GitHub Actions. The test suite is now passing. ✅

I also completed end-to-end integration testing with these software versions:

  • YOURLS/1.9.2
  • PHP/8.2
  • Apache/2.4.57
  • MySQL/8.3

Credit

This combines suggested improvements from:

@nicwaller nicwaller merged commit 0a3203f into master Feb 23, 2024
1 check passed
@nicwaller nicwaller deleted the php-compat-fixes branch February 23, 2024 00:39
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.

Error with Yourls 1.9
1 participant