From 0e4935d078c7534ac90741587577ae1644e58f9d Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Fri, 30 Dec 2011 23:04:28 +0000 Subject: [PATCH] Make sure that _render() is only called with a valid root object. As in, render() can only be validly called once and must not fail on the second call. props SergeyBiryukov, see #19642 for trunk. git-svn-id: https://develop.svn.wordpress.org/trunk@19638 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-admin-bar.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index 8ee6d1cf20..1b8f8b3391 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -196,7 +196,8 @@ class WP_Admin_Bar { public function render() { $root = $this->_bind(); - $this->_render( $root ); + if ( $root ) + $this->_render( $root ); } final protected function _bind() {