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

WP/CronInterval: bugfix for fully qualified time constants #2073

Merged

Commits on Aug 9, 2022

  1. WP/CronInterval: bugfix for fully qualified time constants

    If the WP time constants would be used in their fully qualified form, as is often encountered in namespaced files, the sniff would no longer be able to correctly determine the interval being scheduled.
    
    This commit fixes that.
    
    Note: To prevent constants from a different namespace accidentally matching the WP native constants, the namespace separator is replace by a space character rather than just ignored. The regex before running the `eval()` will prevent code with identifier names other than the WP time constants from being passed to the `eval()`, meaning those will still be reported as "interval undetermined".
    
    Includes unit tests.
    jrfnl committed Aug 9, 2022
    Copy the full SHA
    935257b View commit details
    Browse the repository at this point in the history