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

Incorrect pre_get_ready_cron_jobs implementation #103

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

dd32
Copy link
Contributor

@dd32 dd32 commented Jul 20, 2020

This fixes a fatal error when something requests wp-cron.php while Cavalcade is in use:

Uncaught Error: Cannot use object of type stdClass as array in /public_html/wp-cron.php:121

It seems that Cavalcade returns an object here, where WordPress is expecting an array:
https://core.trac.wordpress.org/browser/trunk/src/wp-cron.php?marks=121#L112

This fixes a fatal error when something requests wp-cron.php while Cavalcade is in use:

```
Uncaught Error: Cannot use object of type stdClass as array in /public_html/wp-cron.php:121
```

https://core.trac.wordpress.org/browser/trunk/src/wp-cron.php?marks=121#L112
Copy link

@hm-linter hm-linter bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting failed (1 error).

1 notice occurred in your codebase, but none on files/lines included in this PR.

@roborourke
Copy link
Contributor

I think there were places in the cavalcade code that expected an object, iirc it was to do with converting it into a Job object but given the tests pass it must've been a hangover from v1.

@roborourke roborourke merged commit a7bb0d3 into humanmade:master Jul 22, 2020
@roborourke
Copy link
Contributor

Released in 2.0.1

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.

2 participants