PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | modules/logs/classes/class-log-install.php +5 -5 6.0.11 → 6.2.2 View file →
@@ -438,18 +438,18 @@
438 438
439 439 if ( empty( $currentVersion ) ) {
440 440 $this->wpdb->query( 'ALTER TABLE ' . $this->table_name( 'wp_logs_archive' ) . ' ADD COLUMN archived_at int(11) NOT NULL DEFAULT 0' ); //phpcs:ignore -- ok.
441 441 } else {
442 - $column = $this->wpdb->get_results(
443 - $this->wpdb->prepare( // phpcs:ignore -- NOSONAR - custom query ok.
444 - "SHOW COLUMNS FROM {$archive} LIKE %s", //phpcs:ignore -- custom query ok.
442 + $column = $this->wpdb->get_results( // phpcs:ignore PluginCheck.Security.DirectDB.UnescapedDBParameter -- $archive is an internal MainWP table identifier; column name is bound via prepare().
443 + $this->wpdb->prepare( // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Table identifiers cannot be placeholders; $archive comes from table_name().
444 + "SHOW COLUMNS FROM {$archive} LIKE %s",
445 445 'archived_at'
446 446 )
447 447 );
448 448
449 449 if ( empty( $column ) ) {
450 - $this->wpdb->query(
451 - "ALTER TABLE {$archive} ADD COLUMN archived_at INT(11) NOT NULL DEFAULT 0" //phpcs:ignore -- ok.
450 + $this->wpdb->query( // phpcs:ignore PluginCheck.Security.DirectDB.UnescapedDBParameter -- $archive is an internal MainWP table identifier; ALTER TABLE has no user input.
451 + "ALTER TABLE {$archive} ADD COLUMN archived_at INT(11) NOT NULL DEFAULT 0"
452 452 );
453 453 }
454 454 }
455 455 }