mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 07:22:01 +01:00
Editor: Unset reference used in foreach statement.
In PHP it is a good practice to unset $value if it was created by reference in a foreach loop, as the reference is still valid outside the loop, and this avoids accidental bugs. Props get_dave. Fixes #60326. Built from https://develop.svn.wordpress.org/trunk@57340 git-svn-id: http://core.svn.wordpress.org/trunk@56846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
97518917dd
commit
7343352744
@ -1070,6 +1070,7 @@ class WP_Theme_JSON {
|
||||
foreach ( $style_nodes as &$node ) {
|
||||
$node['selector'] = static::scope_selector( $options['scope'], $node['selector'] );
|
||||
}
|
||||
unset( $node );
|
||||
}
|
||||
|
||||
if ( ! empty( $options['root_selector'] ) ) {
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.5-alpha-57339';
|
||||
$wp_version = '6.5-alpha-57340';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user