Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use php5, mysql 4.0.24 and drupal 4.6.8
This error occurs when using weekly.modules listing. But it does show the nodes.
Placering /week/2006/06/04
Besked
array_merge() [function.array-merge]: Argument #1 is not an array i /customers/denmarkonline.dk/denmarkonline.dk/httpd.www/includes/menu.inc on line 351.
Menu.inc version:
menu.inc,v 1.79.2.5 2006/03/14 15:26:04 unconed Exp $
Comment | File | Size | Author |
---|---|---|---|
#15 | array-merge-menu.diff.txt | 840 bytes | beginner |
#4 | MENU_PATCH_2.txt | 593 bytes | Prometheus6 |
#1 | MENU_PATCH.txt | 514 bytes | Prometheus6 |
Comments
Comment #1
Prometheus6 CreditAttribution: Prometheus6 commentedThis is what I found, which makes me refile it as a bug vs. menu.inc.
The menu item in week.module that causes the problem:
And the section of menu.inc the error message is complaining about:
I'm not passing callback arguments. This section of code assumes I am, and PHP5 is a lot more sensitive about that sort of thing.
I offer the attached patch.
Comment #2
Dries CreditAttribution: Dries commentedWill commit if someone can reproduce the problem, and confirm that this fixes the issue.
Comment #3
jvandyk CreditAttribution: jvandyk commentedThere should only be an error happening if the value for 'callback arguments' is not an array. The relevant code from HEAD:
So the patch just hides the error. We might check if it's an array and produce a helpful error message. But it should never be the case that 'callback arguments' is NOT set and an error occurs here.
Comment #4
Prometheus6 CreditAttribution: Prometheus6 commentedOkay. This should be acceptable
I use isset() because the only way the original code could fail is if $menu['items'][$mid]['callback arguments'] is set but equals NULL.
I have no clue how that might have happened.
Comment #5
beginner CreditAttribution: beginner commentedHow to reproduce?
Also, if it's a bug, it should be fixed in cvs first, and backported soon after.
Comment #6
Dries CreditAttribution: Dries commentedPromotheus: how does that fix the problem? Or how would that affect the offending module?
The problem is that a module is incorrectly using the callback mechanism. Could you post the code of the offending module, so we can grok the problem a little bit better?
Comment #7
Dries CreditAttribution: Dries commentedNevermind, I figured it out by looking a bit closer to the previous comments.
Comment #8
Dries CreditAttribution: Dries commentedPatch does not apply against CVS HEAD.
Comment #9
drummComment #10
Prometheus6 CreditAttribution: Prometheus6 commentedThe patch was submitted against 4.6.8, not CVS, and should still apply.
Comment #11
beginner CreditAttribution: beginner commentedPrecisely: as I said in #5!
Comment #12
Prometheus6 CreditAttribution: Prometheus6 commentedThe bug exists in 4.6.8. It does not exist in cvs. Check #3, please.
Or don't fix the bug.
Comment #13
beginner CreditAttribution: beginner commentedYou say the bug doesn't exist in 4.7 and HEAD?
Please accept my apologies.
Comment #14
Prometheus6 CreditAttribution: Prometheus6 commentedDone, of course
Comment #15
beginner CreditAttribution: beginner commentedDries already commented on this one.
Also, I checked, this would indeed be a backport of a bug that is already fixed in 4.7 and cvs.
Comment #16
beginner CreditAttribution: beginner commentedthe patch I attached, is basically the same as the previous one, but conforms better to the patch guidelines.
Comment #17
Dries CreditAttribution: Dries commentedPatch no longer applies.
Comment #18
beginner CreditAttribution: beginner commentedI just checked, it does apply.
This must be applied to the 4-6 branch!
Comment #19
Dries CreditAttribution: Dries commentedOops, you're right. Committed to CVS HEAD. Thanks.
Comment #20
Dries CreditAttribution: Dries commentedErm, committed to DRUPAL-4-6.
Comment #21
beginner CreditAttribution: beginner commented:) thanks.
Comment #22
(not verified) CreditAttribution: commented