File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,7 @@ public function __get( $key ) {
331
331
if ( isset ( $ this ->$ key ) ) {
332
332
return $ this ->$ key ;
333
333
} else {
334
- return new WP_error ( 'logger_param_not_set ' , 'The logger param ' . $ key . ' could not be found. ' );
334
+ return new WP_Error ( 'logger_param_not_set ' , 'The logger param ' . $ key . ' could not be found. ' );
335
335
}
336
336
}
337
337
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ public function __get( $key ) {
90
90
if ( isset ( $ this ->$ key ) ) {
91
91
return $ this ->$ key ;
92
92
} else {
93
- return new WP_error ( 'batch_task_param_not_set ' , 'The batch task key ' . $ key . ' could not be found. ' );
93
+ return new WP_Error ( 'batch_task_param_not_set ' , 'The batch task key ' . $ key . ' could not be found. ' );
94
94
}
95
95
}
96
96
}
Original file line number Diff line number Diff line change @@ -232,17 +232,17 @@ public function get( $key ) {
232
232
233
233
// If the logged event could not be found, search event type keys.
234
234
if ( is_wp_error ( $ result ) ) {
235
- $ event_types = $ this ->filter ( [
235
+ $ event_type = $ this ->find ( [
236
236
'type ' => $ key ,
237
237
] );
238
238
239
239
// If that also comes up empty, return the error.
240
- if ( empty ( $ event_types ) ) {
240
+ if ( is_wp_error ( $ event_type ) ) {
241
241
return $ result ;
242
242
}
243
243
244
244
// Return the discovered event.
245
- $ result = $ event_types [ 0 ] ;
245
+ $ result = $ event_type ;
246
246
}
247
247
248
248
return $ result ;
You can’t perform that action at this time.
0 commit comments