diff --git a/modules/slugs/qtx_module_slugs.php b/modules/slugs/qtx_module_slugs.php index 55865035..3d28e2dd 100644 --- a/modules/slugs/qtx_module_slugs.php +++ b/modules/slugs/qtx_module_slugs.php @@ -973,6 +973,11 @@ private function get_last_slash( $slug ) { private function get_page_id_by_path( $page_path, $post_type = 'page' ) { global $wpdb; + // Handle cases where custom query vars with the same names of specific internal query vars (e.g. 'name') are structured as arrays for any reason. + if ( ! is_scalar( $page_path ) ) { + return null; + } + $page_path = rawurlencode( urldecode( $page_path ) ); $page_path = str_replace( '%2F', '/', $page_path ); $page_path = str_replace( '%20', ' ', $page_path );