From 819ab693631716170dbfa9df4616dcb4ccccfdd6 Mon Sep 17 00:00:00 2001 From: Tetrakern <26898880+Tetrakern@users.noreply.github.com> Date: Mon, 4 Nov 2024 21:41:26 +0100 Subject: [PATCH] Fix SQL error for token meta box --- includes/functions/_setup-meta-fields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions/_setup-meta-fields.php b/includes/functions/_setup-meta-fields.php index 034e381f..cfa8a453 100644 --- a/includes/functions/_setup-meta-fields.php +++ b/includes/functions/_setup-meta-fields.php @@ -705,7 +705,7 @@ function fictioneer_get_metabox_tokens( $post, $meta_key, $options, $args = [] ) $description = strval( $args['description'] ?? '' ); // Query post titles if required - if ( ! ( $args['names'] ?? 0 ) ) { + if ( $array && ! ( $args['names'] ?? 0 ) ) { global $wpdb; $placeholders = implode( ',', array_fill( 0, count( $array ), '%d' ) );