Skip to content

Commit d741fea

Browse files
swissspidyCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 86c2b76 commit d741fea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/Cron_Event_Command.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ public function unschedule( $args, $assoc_args ) {
313313
$event_count = 0;
314314
if ( is_array( $crons ) ) {
315315
foreach ( $crons as $cron ) {
316+
if ( ! is_array( $cron ) ) {
317+
continue;
318+
}
316319
if ( isset( $cron[ $hook ] ) ) {
317320
$event_count += count( $cron[ $hook ] );
318321
}

0 commit comments

Comments
 (0)