mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 18:48:18 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@57340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2f91b1f262
commit
a21e447a14
@ -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'] ) ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user