mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user