[drupal-devel] [bug] Menu.inc array_merge error
m3avrck
drupal-devel at drupal.org
Thu Sep 15 18:32:25 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: m3avrck
Status: patch (ready to be committed)
Tested and confirmed, patch works on PHP5, great find ax!
m3avrck
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.
------------------------------------------------------------------------
Thu, 15 Sep 2005 17:50:54 +0000 : ax
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).
------------------------------------------------------------------------
Thu, 15 Sep 2005 18:00:14 +0000 : moshe weitzman
ax's brief patch looks good to me. a few days ago, i tried to track this
down for a while but failed. nice work thox and ax.
More information about the drupal-devel
mailing list