get_comment(), wp_get_post_revision(), and get_term() all used to return by reference. Because of this, $null was set to null so the return value would be a variable where applicable. This has not been necessary since [21792], so the $nulls have been removed.

Props toszcze.
Fixes #24768.



git-svn-id: https://develop.svn.wordpress.org/trunk@27057 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-01-29 06:45:54 +00:00
parent 62b57d8899
commit 13c1dd0004
3 changed files with 4 additions and 7 deletions

View File

@@ -256,11 +256,10 @@ function _wp_put_post_revision( $post = null, $autosave = false ) {
* @return mixed Null if error or post object if success.
*/
function wp_get_post_revision(&$post, $output = OBJECT, $filter = 'raw') {
$null = null;
if ( !$revision = get_post( $post, OBJECT, $filter ) )
return $revision;
if ( 'revision' !== $revision->post_type )
return $null;
return null;
if ( $output == OBJECT ) {
return $revision;