Skip to content

Commit 54f2fbd

Browse files
Copilotswissspidy
andcommitted
Fix lazy-loading check to work with magic __get method
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 7b99cd6 commit 54f2fbd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Cron_Event_Command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ public function list_( $args, $assoc_args ) {
115115
}
116116

117117
// Populate actions field only if requested
118-
if ( ! empty( $formatter->fields ) && in_array( 'actions', $formatter->fields, true ) ) {
118+
$requested_fields = $formatter->fields;
119+
if ( ! empty( $requested_fields ) && in_array( 'actions', $requested_fields, true ) ) {
119120
foreach ( $events as $event ) {
120121
$event->actions = self::get_hook_actions( $event->hook );
121122
}

0 commit comments

Comments
 (0)