Networks and Sites: Set `WP_Network` properties via setters upon creation.

This ensures that `WP_Network::$id` is stored internally as `int`, to match the documented type.

Follow-up to [37870].

Props ironprogrammer, scottculverhouse, spacedmonkey, SergeyBiryukov.
See #62035.
Built from https://develop.svn.wordpress.org/trunk@59020


git-svn-id: http://core.svn.wordpress.org/trunk@58416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-09-13 22:12:15 +00:00
parent bd4c40b4c2
commit 997455c982
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ class WP_Network {
*/
public function __construct( $network ) {
foreach ( get_object_vars( $network ) as $key => $value ) {
$this->$key = $value;
$this->__set( $key, $value );
}
$this->_set_site_name();

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-59019';
$wp_version = '6.7-alpha-59020';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.