Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workaround for a bug in BackupBuddy that would cause this libra…
…ry to run a new update check every few seconds. This affects BackupBuddy 3.2.0.2 and possibly multiple other versions. Analysis: - PluginUpdateChecker creates a custom cron schedule by using the cron_schedules filter. This schedule is used to run periodic update checks. - BackupBuddy also creates a number of custom schedules using the same filter. However, its filter callback throws away any schedules defined by other filters/plugins and re-initializes $schedules with an empty array(). - As a result, if the filter that was added by BackupBuddy runs *after* the filter added by PluginUpdateChecker, our custom schedule is destroyed. - When WordPress tries to re-schedule our event after a successful Cron run, it discovers that the required schedule no longer exists, and fails. On the next page load, the library detects that the event is not scheduled and schedules it again. Hence infinite loop. - Fixed by moving our cron_schedules filter to a later priority. Notes: This is the *second* time I have to add a workaround for some arrogant oversight perpetrated by BackupBuddy developers. (The first one was the "plugins_api" thing, IIRC).
- Loading branch information