phpBB3

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_pm_compose.php on line 427: Undefined index: u

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Resolution: Fixed
  • Affects Version/s: 3.0.3
  • Fix Version/s: 3.0.4
  • Labels:
    None
  • Environment:
    PHP Environment:
    Database:

Description

Hi,

right now, after having updated my local testboard to 3.0.3, I get the dubug notice

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_pm_compose.php on line 427: Undefined index: u

when I read a PM that has a history and when I click on the "quote" or "reply" button at the oldest PM in the history.
It does not happen when I click on the "quote" or "reply" button at a PM in the history which is not the oldest one.

The PM I'm reading has a history of 3 PMs:

01.10.2008, 10:57. Author: my moderator. Clicking on "reply" or "quote" doesn't lead to the debug notice
01.10.2008, 10:30. Author: me. No "reply" or "quote" button visible.
01.10.2008, 09:20. Author: my moderator. Clicking on "reply" or "quote" causes the debug notice.

My ucp_pm_compose.php is the original one from 3.0.3.

Regards
Wolfgang

Activity

Hide
Joas Schilling added a comment -

I can't reproduce it here on phpbb.com

Show
Joas Schilling added a comment - I can't reproduce it here on phpbb.com
Hide
A_Jelly_Doughnut added a comment -

I don't think PHP notices are displayed at phpbb.com. However, I cannot reproduce on my test board either.

Show
A_Jelly_Doughnut added a comment - I don't think PHP notices are displayed at phpbb.com. However, I cannot reproduce on my test board either.
Hide
IPB_Refugee added a comment -

Thank you. I will simply delete the two buttons in ucp_pm_history.html

Regards
Wolfgang

EDIT: No, that doesn't help... When I click on "Show PM" within the PM history and then I click on "quote" button, the same debug notice gets displayed. But again only with the oldest PM in history.

Show
IPB_Refugee added a comment - Thank you. I will simply delete the two buttons in ucp_pm_history.html Regards Wolfgang EDIT: No, that doesn't help... When I click on "Show PM" within the PM history and then I click on "quote" button, the same debug notice gets displayed. But again only with the oldest PM in history.
Hide
IPB_Refugee added a comment -

Don't know if it helps, but I looked at the variable $list:

// We try to include every previously listed member from the TO Header
		$list = rebuild_header(array('to' => $post['to_address']));

		var_dump($list);

		$list = $list['u'];

		var_dump($list);

The result after

$list = rebuild_header(array('to' => $post['to_address']));

is:

array(1) {
["g"]=>
array(1)

Unknown macro: { [462]=> string(2) "to" }

}

The result after

$list = $list['u'];

is NULL.

Regards
Wolfgang

Show
IPB_Refugee added a comment - Don't know if it helps, but I looked at the variable $list:
// We try to include every previously listed member from the TO Header
		$list = rebuild_header(array('to' => $post['to_address']));

		var_dump($list);

		$list = $list['u'];

		var_dump($list);
The result after
$list = rebuild_header(array('to' => $post['to_address']));
is:
array(1) { ["g"]=> array(1)
Unknown macro: { [462]=> string(2) "to" }
}
The result after
$list = $list['u'];
is NULL. Regards Wolfgang
Hide
IPB_Refugee added a comment -

Quick and dirty fix:

Change

$list = $list['u'];

to

$list = (isset($list['u'])) ? $list['u'] : $list;

in function compose_pm.

Regards
Wolfgang

Show
IPB_Refugee added a comment - Quick and dirty fix: Change
$list = $list['u'];
to
$list = (isset($list['u'])) ? $list['u'] : $list;
in function compose_pm. Regards Wolfgang

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: