From b50b363ff51880fafd08e402a77779de7cac7b7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Lavoie?= <seb@wemakecustom.com>
Date: Fri, 30 Mar 2012 12:55:53 -0400
Subject: [PATCH] patched bbpress theme compat for 5.4 warning concerning
object not initialized
---
.../bbp-includes/bbp-theme-compatibility.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/bbp-includes/bbp-theme-compatibility.php b/bbp-includes/bbp-theme-compatibility.php
index d572afa..bcdc56e 100644
|
a
|
b
|
class BBP_Theme_Compat { |
| 66 | 66 | * @param BBP_Theme_Compat $theme |
| 67 | 67 | */ |
| 68 | 68 | function bbp_setup_theme_compat( $theme = '' ) { |
| 69 | | bbpress()->theme_compat->theme = $theme; |
| | 69 | $bbp = bbpress(); |
| | 70 | if (!is_object($bbp->theme_compat)) { |
| | 71 | $bbp->theme_compat = new stdClass; |
| | 72 | } |
| | 73 | $bbp->theme_compat->theme = $theme; |
| 70 | 74 | } |
| 71 | 75 | |
| 72 | 76 | /** |
| … |
… |
function bbp_theme_compat_reset_post( $args = array() ) { |
| 246 | 250 | unset( $post ); |
| 247 | 251 | |
| 248 | 252 | // Setup the dummy post object |
| | 253 | $wp_query->post = new stdClass; |
| 249 | 254 | $wp_query->post->ID = $dummy['ID']; |
| 250 | 255 | $wp_query->post->post_title = $dummy['post_title']; |
| 251 | 256 | $wp_query->post->post_author = $dummy['post_author']; |