Skip to content

Commit 8b93b41

Browse files
Code Quality: Fix PHPStan undefined variable errors in ms-settings.php
1 parent f86194a commit 8b93b41

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/wp-admin/comment.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
/**
1616
* @global string $action
17-
* @global int $comment_id Comment ID.
1817
*/
19-
global $action, $comment_id;
18+
global $action;
2019

2120
$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
2221

@@ -49,7 +48,8 @@
4948
);
5049
}
5150
} else {
52-
$comment = null;
51+
$comment_id = 0;
52+
$comment = null;
5353
}
5454

5555
switch ( $action ) {

src/wp-includes/ms-settings.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
* Use `get_current_network_id()` instead.
3434
* @global bool $public Deprecated. Whether the site found on load is public.
3535
* Use `get_site()->public` instead.
36+
* @global string $table_prefix Database table prefix.
37+
* @global wpdb $wpdb WordPress database abstraction object.
3638
*/
37-
global $current_site, $current_blog, $domain, $path, $site_id, $public;
39+
global $current_site, $current_blog, $domain, $path, $site_id, $public, $table_prefix, $wpdb;
3840

3941
/** WP_Network class */
4042
require_once ABSPATH . WPINC . '/class-wp-network.php';

0 commit comments

Comments
 (0)