mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@50692 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ab3dbadec4
commit
4e5569ddd3
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user