Closed (outdated)
Project:
Drupal core
Version:
6.28
Component:
other
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2010 at 06:55 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirThis means that something calls l() wrong, the second argument is not an array. And I assume it is a contrib module, because I can't reproduce it.
You need to figure out who is the caller. Open that file, go to that line (or look for "function l($text, $path, $options = array()) {")) and then insert "array " before $options so that it looks like "function l($text, $path, array $options = array()) {".
Then access the above link again, that should give you a different error message. Post that here.
Comment #2
Mascher commentedI insert "array" how u write, but i have some error message...
Fatal error: Unsupported operand types in /var/www/fantasy-portal.ru/htdocs/includes/common.inc on line 1592But... I have error in logs:
Argument 3 passed to l() must be an array, null given, called in /var/www/fantasy-portal.ru/htdocs/includes/menu.inc on line 1612 and defined in file /var/www/fantasy-portal.ru/htdocs/includes/common.inc on line 1585.Comment #3
berdirOk, strange.
We just have to dig until we find where this is coming from.
So open common.inc again and add the following code (without < ?php / ? >) directly above the "// Merge in defaults.":
and then print the output here...
Comment #4
heine commentedComment #5
fax8 commentedThere are actually 2 lines containing "// Merge in defaults.". I guess that's the one in the l() function. I have it at line 1588.
Comment #6
fax8 commentedI faced this error after upgrading one of my websites from d5 to d6 .. I had a custom block containing some PHP code which used the old d5 definition of l() while, after upgrading to d6, it's required to use the new d6 l() syntax.
In particular I had something like:
and I had to convert it to:
Hope this helps,
Fabio Varesano
Comment #7
RedTop commentedI' m getting the same error when trying to access the settings page of one of the menus. It is quite a large menu with lots of child items (max dept probably around 5 levels or so). I' m able to access the other menus' settings just fine.
I tried the backtrace and the output was incredibly large. I have attached it to this comment.
Smart suggestions, anyone? :)
[edit]
Some debugging I tried today:
- Tried debugging as described here: http://drupal.org/node/362799. Unfortunately the output didn't change so that didn't help.
- I also tried the hack here: http://justinhileman.info/articles/unsupported-operand-types-in-drupal-6x , didn't help either (output stays the same except obviously for line number). :(
- I also tried disabling contributed modules by renaming the folders. None of the contributed modules seem to be the cause of this problem.
- Compared common.inc with a clean copy I always keep as a backup (sometimes it's hard keeping track of things when debugging). No differences. Copied the clean copy to includes folder anyway but didn't make a difference.
- The site has no custom blocks using PHP snippets (In fact, no custom snippets used anywhere on the site).
- The backtrace output mentiones line 73 in menu.admin.inc:73 of the menu module:
[edit]
This fix did the trick for me:
http://drupal.org/node/228435#comment-782632
Comment #8
Mascher commentedBerdir I do as u say and i have this code in common.inc:
And i have this output:
In log i have:
You can see this at - http://fantasy-portal.ru/blog/amon/lalalalala , as sample.
And! This patch help me:
http://drupal.org/node/228435#comment-782632
but i restore Berdir writen code for test and patch if need.
Comment #9
deep-z commentedMaybe incorrect URL formation, caused by some module conflicting with core clean url's system.
Make sure you don't have Clean pagination module (6.x-1.0-alpha2 version in my case) enabled. Disabled it and error vanished.
Hope this helps.
Comment #10
Mascher commentedBerdir read this issue? I have patch now:
http://drupal.org/node/228435#comment-782632
If u need see debug tell me here...
Comment #11
Mascher commentedUnassign now...
Comment #12
golubovicm commentedExactly same error happened to me, but fortunately it was in module I was working on, so I managed to localize it. Problem was that I by mistake named my functions like hooks, even they was not hooks.
My module name is "flash_uploader", and I named functions i.e. "flash_uploader_generate()".
So, I guess Drupal realized that this function is some mysterious hook_generate() hook and tried to do something with it and crushed there.
Just a wild guess - I'm still Drupal beginner.
Comment #13
pydubreucq commentedHi all,
Excuse-me I'm French and I don't speak english very well...
I have the same problem.
This occur when I configure error page (403 & 404) in :
/admin/settings/error-reporting
If I don't put one I don't have this error...
Like on this page :
http://drupal.org/node/362799
I've modify common.inc to see what's the problem :
When I want to see my custom error page I can see now that :
If I go on the line 1612 in menu.inc file I can see that :
If I comment that, my 404 error page works fine :)
This is not the right solution, but it works
breadcrumb is a priority for me
Thanks by advance for your help ;)
Bye
Comment #14
pydubreucq commentedThis patch works fine :
http://drupal.org/node/228435#comment-782632
I've modify it because the line was not good...
You can find it on this comment.
Bye ;)
Comment #15
Ela commented#14 works for me, Thank you :)
Comment #16
harvlad commentedHey, this happened to me using the Me module
Comment #17
RedTop commentedMultiple comments mention that this patch works and fixes the issue:
http://drupal.org/node/228435#comment-782632
pydubreucq modified the patch and included it in #14.
This thread is a duplicate and a fix is available. Now we just have to wait on the devvers in http://drupal.org/node/228435#comment-782632 to perfect it and commit to core.
Setting this as 'fixed' even though the fix available hasn't been perfected/committed yet. The patch works and a 'fixed' status will be more meaningful for people looking for a patch.
Comment #18
damien tournoud commentedThere is nothing to fix here. Drupal Core works as designed, but something is calling the API in an incorrect way. Try to fix the really issue, not the symptom, please.
Comment #19
Ela commentedAs in #7, I had this error when trying to access one of the menus. I deleted the menu, created it again, but gave it a different system name, and without the patch all seems fine.
Comment #20
gianfrasoft commentedUsing the debug method explained in http://drupal.org/node/362799 I changed in menu.inc the rows:
in
and problem seems to be solved. I think that is an invalid call of l() function, passing from the D5 sintax to the D6 one.
Comment #22
damien tournoud commentedComment #23
SHS commented#20 worked for me! thanks a lot :)
Comment #24
hchall commentedThanks pydubreucq! #20 worked for me!
Comment #25
darrellduane commented#20 was a big help -- This issue only happened when the user was anonymous, when logged in the error didn't happen.
Comment #26
-enzo- commentedThanks pydubreucq! #20 worked for me! too
Comment #27
salientknight commentedNot sure what this adds to the conversation, but I just made a copy of a working site, and then started to get this error when logging in to the copy. All database and path settings are correct and they are on the same server... two other copies I made work fine.
*stumped*
Comment #28
salientknight commentedI needed to update my $cookie_domain variable in settings.php.
Comment #29
Michsk commentedI can also confim as stated in @#16 (http://drupal.org/node/739158#comment-3804798). This is happening with the ME module (offcourse multiple modules can have this, but ME is confirmed that it has this issue). Will look at it.
Those who also have this with the me module: http://drupal.org/node/899508#comment-5122266
Comment #30
David_Rothstein commentedNote that for the case where this kind of error occurs on custom 403 and 404 pages (as described in #13 above), this is likely due to #918356: WSOD when drupal_get_title called during hook_init and custom 403 or 404 pages are being used.
Comment #31
mattcasey commented#20 works for me, I am using Acquia's latest Drupal 6.x version and got the error for 404 pages.
Comment #33
amstel commented#20 also worked for me. I had this error message when trying to access admin pages after session expired.
Comment #34
chinita7 commented#20 worked for me also. Thanks.
Comment #35
carsonblack commentedThis is still broken in 6.28
#20 works
Comment #36
carsonblack commentedHere is a patch implementing #20.
Comment #37
carsonblack commentedComment #38
codenamerhubarb commentedThanks gianfrasoft
#20 also worked for me!