Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use correct error handling
  • Loading branch information
getdave committed Oct 17, 2025
commit 5ae57578860b72a9e2df0fa43b636597f5a23a29
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.9/post-data-block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function gutenberg_block_bindings_post_data_get_value( array $source_args, $bloc

if ( 'link' === $source_args['key'] ) {
$permalink = get_permalink( $post_id );
return is_wp_error( $permalink ) ? null : esc_url( $permalink );
return false === $permalink ? null : esc_url( $permalink );
}
}

Expand Down
3 changes: 2 additions & 1 deletion lib/compat/wordpress-6.9/term-data-block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ function gutenberg_block_bindings_term_data_get_value( array $source_args, $bloc

case 'link':
// Only taxonomy entities are supported by Term Data.
return esc_url( get_term_link( $term ) );
$term_link = get_term_link( $term );
return is_wp_error( $term_link ) ? null : esc_url( $term_link );

case 'slug':
return esc_html( $term->slug );
Expand Down