Make WordPress Core


Ignore:
Timestamp:
01/23/2024 05:09:23 PM (3 years ago)
Author:
youknowriad
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-theme-json.php

    r57254 r57340  
    10711071                                $node['selector'] = static::scope_selector( $options['scope'], $node['selector'] );
    10721072                        }
     1073                        unset( $node );
    10731074                }
    10741075
Note: See TracChangeset for help on using the changeset viewer.