mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
General: Use static on closures whenever $this is not used to avoid memory leaks.
Props westonruter, jrf, spacedmonkey. Fixes #58323. git-svn-id: https://develop.svn.wordpress.org/trunk@55822 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
add_action(
|
||||
'template_redirect',
|
||||
function() {
|
||||
static function() {
|
||||
|
||||
global $timestart;
|
||||
|
||||
@@ -15,7 +15,7 @@ add_action(
|
||||
|
||||
add_action(
|
||||
'shutdown',
|
||||
function() use ( $server_timing_values, $template_start ) {
|
||||
static function() use ( $server_timing_values, $template_start ) {
|
||||
|
||||
global $timestart;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user