mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00: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. git-svn-id: https://develop.svn.wordpress.org/trunk@57340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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'] ) ) {
|
||||
|
||||
Reference in New Issue
Block a user