Coding Standards: Remove unnecessary `unset()` calls in `WP_Importer` methods.
Variables created within the scope of a function are discarded automatically when PHP leaves the scope of the function, i.e. on `return`, so doing a call to `unset()` straight before a `return` statement is redundant. Props jrf, ravipatel, rachelbaker, mukesh27. Fixes #52996. Built from https://develop.svn.wordpress.org/trunk@50692 git-svn-id: http://core.svn.wordpress.org/trunk@50301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7d65ff4f7a
commit
57da3e7813
|
@ -42,9 +42,6 @@ class WP_Importer {
|
|||
}
|
||||
} while ( count( $results ) == $limit );
|
||||
|
||||
// Unset to save memory.
|
||||
unset( $results, $r );
|
||||
|
||||
return $hashtable;
|
||||
}
|
||||
|
||||
|
@ -72,9 +69,6 @@ class WP_Importer {
|
|||
$count = (int) $result[0]->cnt;
|
||||
}
|
||||
|
||||
// Unset to save memory.
|
||||
unset( $results );
|
||||
|
||||
return $count;
|
||||
}
|
||||
|
||||
|
@ -117,9 +111,6 @@ class WP_Importer {
|
|||
}
|
||||
} while ( count( $results ) == $limit );
|
||||
|
||||
// Unset to save memory.
|
||||
unset( $results, $r );
|
||||
|
||||
return $hashtable;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.8-alpha-50689';
|
||||
$wp_version = '5.8-alpha-50692';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue