| @@ -1068,11 +1068,10 @@ | ||
| 1068 | 1068 | public static function get_suggestions_count( int $post_id ): int { |
| 1069 | 1069 | $cache_key = self::get_suggestions_count_cache_key( $post_id ); |
| 1070 | 1070 | $count = wp_cache_get( $cache_key, PARSELY_CACHE_GROUP ); |
| 1071 | 1071 | |
| 1072 | - if ( false !== $count ) { | |
| 1073 | - /** @var int $count */ | |
| 1074 | - return $count; | |
| 1072 | + if ( false !== $count && is_numeric( $count ) ) { | |
| 1073 | + return (int) $count; | |
| 1075 | 1074 | } |
| 1076 | 1075 | |
| 1077 | 1076 | $args = array( |
| 1078 | 1077 | 'post_type' => 'parsely_smart_link', |
| @@ -1115,9 +1114,9 @@ | ||
| 1115 | 1114 | // Get all posts of type parsely_smart_link that have the destination taxonomy set to the post_id |
| 1116 | 1115 | // and the smart_link_status set to pending. |
| 1117 | 1116 | $args = array( |
| 1118 | 1117 | 'post_type' => 'parsely_smart_link', |
| 1119 | - 'posts_per_page' => -1, | |
| 1118 | + 'posts_per_page' => -1, // phpcs:ignore WordPressVIPMinimum.Performance.NoPaging.posts_per_page_posts_per_page | |
| 1120 | 1119 | 'fields' => 'ids', |
| 1121 | 1120 | // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_tax_query |
| 1122 | 1121 | 'tax_query' => array( |
| 1123 | 1122 | 'relation' => 'AND', |