during the last days I upgraded my board from 3.0.4 > 3.0.5 > 3.0.6 (and it was not a funny experience...)
I have debug mode enabled in config.php:
- Code: Select all
@define('DEBUG', true);
@define('DEBUG_EXTRA', true);
And now I'm getting several debug notices. When I visit the main page in user control panel (ucp.php), I get:
[phpBB Debug] PHP Notice: in file /includes/functions_display.php on line 1287: Undefined offset: 148
After replacing line 1287, which is
- Code: Select all
$phpbb_seo->prepare_iurl($active_t_row, 'topic', $active_t_row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$active_t_forum_id]);
with the following line:
- Code: Select all
$phpbb_seo->prepare_iurl($active_t_row, 'topic', $active_t_row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $active_t_forum_id);
the debug notice is gone.
When I read a topic, I get:
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 393: Undefined offset: 104
This is line 393 in viewtopic.php:
- Code: Select all
$_parent = $phpbb_seo->seo_url['forum'][$forum_id];
There is no more debug notice when I replace the line with:
- Code: Select all
$_parent = $forum_id;
When I do any search, I get something like this:
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 108
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 104
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 104
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 136
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 102
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 104
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 105
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 282
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 104
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 103
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 148
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 105
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 104
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 71
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 132
[phpBB Debug] PHP Notice: in file /search.php on line 1036: Undefined index: 52
So I get one debug notice per displayed topic (On my board 16 topics per page are displayed.) The number after "Undefined index" is the ID of the forum with the found topic.
When I replace line 1036 in search.php, which is
- Code: Select all
$phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$u_forum_id]);
with
- Code: Select all
$phpbb_seo->prepare_iurl($row, 'topic', $row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $u_forum_id);
the debug notices disappear.
When I try to post a message or a new topic, I get:
[phpBB Debug] PHP Notice: in file /includes/functions_posting.php on line 2784: Undefined offset: 4
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 2477: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3538)
There is no more content on this page besides the two PHP notices. (Nonetheless the message was stored in the data base successfully.)
When I replace line 2784:
- Code: Select all
$phpbb_seo->prepare_iurl($data, 'topic', $topic_type == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$data['forum_id']]);
with:
- Code: Select all
$phpbb_seo->prepare_iurl($data, 'topic', $topic_type == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $data['forum_id']);
everything is okay.
Probably something went wrong during the update. Or does someone else get similar debug notices?
Is it safe to do the code replacements I mentioned above? Or is there a better solution?
Best regards
Wolfgang
EDIT: And when you enable "Activate SQL Rewriting", in posting.php change
- Code: Select all
$_parent = $post_data['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$forum_id];
to
- Code: Select all
$_parent = $post_data['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $forum_id;

English |
French


