Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions includes/class-acf-schema-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public static function resolve_crud_root_id( $id, $root ) {
* @return mixed|null
*/
public static function resolve_post_object_source( $source, $value ) {
// Bail if $value is empty to prevent an unexpected query result.
if ( empty( $value ) ) {
return $source;
}

$post = get_post( $value );
if ( $post instanceof \WP_Post ) {
switch ( $post->post_type ) {
Expand Down