← All changes
|
WPDataAccess/Plugin_Table_Models/WPDA_Plugin_Table_Base_Model.php
+3
-3
5.5.23
→
5.5.84
View file →
| @@ -30,9 +30,9 @@ | ||
| 30 | 30 | * Check if const BASE_TABLE_NAME is defined (cannot proceed without) |
| 31 | 31 | */ |
| 32 | 32 | public static function check_base_table_name() { |
| 33 | 33 | if ( null === static::BASE_TABLE_NAME ) { |
| 34 | - wp_die( __( 'Wrong usage of class WPDA_Plugin_Table_Base_Model [missing BASE_TABLE_NAME]', 'wp-data-access' ) ); | |
| 34 | + wp_die( esc_attr__( 'Wrong usage of class WPDA_Plugin_Table_Base_Model [missing BASE_TABLE_NAME]', 'wp-data-access' ) ); | |
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
| @@ -67,9 +67,9 @@ | ||
| 67 | 67 | public static function count() { |
| 68 | 68 | static::check_base_table_name(); |
| 69 | 69 | |
| 70 | 70 | global $wpdb; |
| 71 | - $result = $wpdb->get_results( | |
| 71 | + $result = $wpdb->get_results( // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- plugin table | |
| 72 | 72 | $wpdb->prepare( |
| 73 | 73 | 'SELECT count(*) AS noitems FROM `%1s` ', // phpcs:ignore WordPress.DB.PreparedSQLPlaceholders |
| 74 | 74 | array( |
| 75 | 75 | WPDA::remove_backticks( static::get_base_table_name() ), |
| @@ -75,9 +75,9 @@ | ||
| 75 | 75 | WPDA::remove_backticks( static::get_base_table_name() ), |
| 76 | 76 | ) |
| 77 | 77 | ), |
| 78 | 78 | 'ARRAY_A' |
| 79 | - ); // phpcs:ignore Standard.Category.SniffName.ErrorCode | |
| 79 | + ); | |
| 80 | 80 | |
| 81 | 81 | if ( 1 === $wpdb->num_rows ) { |
| 82 | 82 | return $result[0]['noitems']; |
| 83 | 83 | } else { |