[drupal-devel] [bug] Menu.inc array_merge error

ax drupal-devel at drupal.org
Thu Sep 15 17:50:59 UTC 2005


Issue status update for 
http://drupal.org/node/31306
Post a follow up: 
http://drupal.org/project/comments/add/31306

 Project:      Drupal
 Version:      cvs
 Component:    menu system
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  Thox
 Updated by:   ax
 Status:       patch (code needs review)

to be completely sure, there probably should be similar isset() checks
around both of

<?php
$_menu['items'][$mid]['access'] = $item['access'];
$_menu['items'][$mid]['callback'] = $item['callback'];
?>


as both keys aren't required in menu items (according to
drupaldocs.org).




ax



Previous comments:
------------------------------------------------------------------------

Thu, 15 Sep 2005 14:38:53 +0000 : Thox

Attachment: http://drupal.org/files/issues/menu.inc_3.patch (801 bytes)

On a PHP 5 system, enabling comments and visiting a comment adding
screen causes an array_merge error for me. The patch included prevents
this from happening on my system.




------------------------------------------------------------------------

Thu, 15 Sep 2005 14:51:43 +0000 : m3avrck

Confirmed error on PHP5 here. Patch does indeed fix problem, which not
only creates the warning, but prevents rest of page from showing since
output occured before the headers were sent.




------------------------------------------------------------------------

Thu, 15 Sep 2005 14:59:57 +0000 : killes at www.drop.org

I think this error was caused by a callback argument in comment.module
that was a string. this has been fixed a few days ago. So I think we
won't need this patch. Can somebody confirm this?




------------------------------------------------------------------------

Thu, 15 Sep 2005 15:06:35 +0000 : killes at www.drop.org

Ok, I've been convinced that this is nto the same error. In fact, there
is no callback arguement set and that is why it errors out. Please
commit.




------------------------------------------------------------------------

Thu, 15 Sep 2005 17:44:26 +0000 : ax

Attachment: http://drupal.org/files/issues/menu.inc_4.patch (902 bytes)

an alternative patch that goes to the root of the problem (i think) and
prevents that empty array wrongly to be set at the first place. there
is no 'callback arguments' key in the 'comment/reply' menu item, so it
shoudn't be set (to NULL) neither (to not fool later array_key_exists()
checks).


please consider this instead.







More information about the drupal-devel mailing list