Skip to content

Commit 66917c2

Browse files
committed
improve callback validation for data fetching
Signed-off-by: Kev Provance <[email protected]>
1 parent 3e41f94 commit 66917c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redux-core/inc/classes/class-redux-wordpress-data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ private function get_data( string $type, $args, $current_value ) {
471471
break;
472472

473473
case 'callback':
474-
if ( ! empty( $args ) && is_string( $args ) && function_exists( $args ) ) {
474+
if ( ! empty( $args ) && is_callable( $args ) ) {
475475
$data = call_user_func( $args, $current_value );
476476
}
477477

0 commit comments

Comments
 (0)