We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a98c4a2 commit 97582efCopy full SHA for 97582ef
.github/changelog/2497-from-description
@@ -0,0 +1,4 @@
1
+Significance: patch
2
+Type: fixed
3
+
4
+Undefined array key warning in Scheduler::async_batch when called without arguments.
includes/class-scheduler.php
@@ -472,7 +472,7 @@ public static function async_batch() {
472
473
self::lock( $key );
474
475
- if ( \is_callable( $args[0] ) ) {
+ if ( \is_callable( $args[0] ?? null ) ) {
476
$callback = \array_shift( $args ); // Remove $callback from arguments.
477
}
478
$next = \call_user_func_array( $callback, $args );
0 commit comments