Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-7905 now.

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

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

Comments / History

Posted by nickvergessen (Development Team Member) on Nov 20th 2008, 07:45

I can't reproduce it here on phpbb.com

Posted by A_Jelly_Doughnut (Former Team Member) on Nov 20th 2008, 13:25

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

Posted by IPB_Refugee on Nov 20th 2008, 13:41

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. :-(

Edited post #123215

Action performed by IPB_Refugee on Nov 20th 2008, 13:50

Posted by IPB_Refugee on Nov 20th 2008, 19:50

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

Code: Select all
      // 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

Code: Select all
      $list = rebuild_header(array('to' => $post['to_address']));


is:

array(1) {
["g"]=>
array(1) {
[462]=>
string(2) "to"
}
}


The result after

Code: Select all
      $list = $list['u'];


is NULL.

Regards
Wolfgang

Posted by IPB_Refugee on Nov 20th 2008, 20:44

Quick and dirty fix:

Change

Code: Select all
      $list = $list['u'];


to

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


in function compose_pm.

Regards
Wolfgang

Assigned ticket to user "Acyd Burn"

Action performed by Acyd Burn (Server Manager) on Nov 22nd 2008, 17:50

Linked ticket with changeset: r9072

Action performed by Anonymous (I am too lazy to register) on Nov 22nd 2008, 17:53

Changed ticket status from "New" to "Fix completed in SVN"

Action performed by Acyd Burn (Server Manager) on Nov 22nd 2008, 17:58

Ticket details

Related SVN changesets