Skip to content

Commit c723e92

Browse files
fixed that forum list in admin area was displayed incorrectly beginning with PHP 5.4
The reason: "Call-time pass by reference has been removed" in PHP 5.4. There is no more reference sign on a function call - only on function definitions. see: http://php.net/manual/en/migration54.incompatible.php
1 parent 607e2d2 commit c723e92

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

bb-admin/includes/functions.bb-admin.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1257,27 +1257,27 @@ class BB_Walker_ForumAdminlistitems extends BB_Walker {
12571257
var $tree_type = 'forum';
12581258
var $db_fields = array ('parent' => 'forum_parent', 'id' => 'forum_id'); //TODO: decouple this
12591259

1260-
function start_lvl($output, $depth) {
1260+
function start_lvl(&$output, $depth) {
12611261
$indent = str_repeat("\t", $depth) . ' ';
12621262
$output .= $indent . "<ul id='forum-root-$this->forum_id' class='list-block holder'>\n";
12631263
return $output;
12641264
}
12651265

1266-
function end_lvl($output, $depth) {
1266+
function end_lvl(&$output, $depth) {
12671267
$indent = str_repeat("\t", $depth) . ' ';
12681268
$output .= $indent . "</ul>\n";
12691269
return $output;
12701270
}
12711271

1272-
function start_el($output, $forum, $depth) {
1272+
function start_el(&$output, $forum, $depth) {
12731273
$this->forum_id = $forum->forum_id;
12741274
$indent = str_repeat("\t", $depth + 1);
12751275
$output .= $indent . "<li id='forum-$this->forum_id'" . get_alt_class( 'forum', 'forum clear list-block' ) . ">\n";
12761276

12771277
return $output;
12781278
}
12791279

1280-
function end_el($output, $forum, $depth) {
1280+
function end_el(&$output, $forum, $depth) {
12811281
$indent = str_repeat("\t", $depth + 1);
12821282
$output .= $indent . "</li>\n";
12831283
return $output;

bb-includes/class.bb-walker.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ class BB_Walker {
55
var $db_fields;
66

77
//abstract callbacks
8-
function start_lvl($output) { return $output; }
9-
function end_lvl($output) { return $output; }
10-
function start_el($output) { return $output; }
11-
function end_el($output) { return $output; }
8+
function start_lvl(&$output) { return $output; }
9+
function end_lvl(&$output) { return $output; }
10+
function start_el(&$output) { return $output; }
11+
function end_el(&$output) { return $output; }
1212

1313
function _init() {
1414
$this->parents = array();
@@ -127,15 +127,15 @@ class BB_Walker_Blank extends BB_Walker { // Used for template functions
127127
var $end_lvl = '';
128128

129129
//abstract callbacks
130-
function start_lvl( $output, $depth ) {
130+
function start_lvl( &$output, $depth ) {
131131
if ( !$this->start_lvl )
132132
return '';
133133
$indent = str_repeat("\t", $depth);
134134
$output .= $indent . "$this->start_lvl\n";
135135
return $output;
136136
}
137137

138-
function end_lvl( $output, $depth ) {
138+
function end_lvl( &$output, $depth ) {
139139
if ( !$this->end_lvl )
140140
return '';
141141
$indent = str_repeat("\t", $depth);

0 commit comments

Comments
 (0)