Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
not sure how this related to previous issues on the 2.x branch. I am using all -dev modules on this test site.
array_merge(): Argument #2 is not an array flag_flag.inc:187 [warning]
Invalid argument supplied for foreach() flag_flag.inc:206 [warning]
array_merge(): Argument #2 is not an array flag_flag.inc:187 [warning]
PHP Fatal error: Unsupported operand types in sites/all/modules/flag/includes/flag/flag_flag.inc on line 118
Fatal error: Unsupported operand types in sites/all/modules/flag/includes/flag/flag_flag.inc on line 118
Drush command terminated abnormally due to an unrecoverable error.
Comment | File | Size | Author |
---|---|---|---|
#16 | unsupported-operands-1813346-13.patch | 610 bytes | slefevre1 |
#9 | flag_flag.inc-error.png | 145 KB | dang42 |
Comments
Comment #1
joachim CreditAttribution: joachim commentedLooks like everything starts going wrong here:
What's your flag link type? is it a module that's caught up with 3.x API changes yet?
Comment #2
likewhoa CreditAttribution: likewhoa commentedi was in a hurry thus reverted back to 2.x-dev.
Comment #3
justkristin CreditAttribution: justkristin commentedI have reproduce this, unhappily. The error appears, as shown below, in my apache error log. A few of the triggers were off-site, and I have no idea why they would even be the source of these errors, as our site is unknown...
Anyway, my info file reads:
Not sure what to try now, as I am WSODed.
Comment #4
joachim CreditAttribution: joachim commentedCan you provide a backtrace please?
And actually, debug output of the variables at the problem point would be needed too.
This is probably a misbehaving module which is not providing the right data at this point. Do you have any Flag ecosystem modules installed? Are they updated for 3.x?
Comment #5
joachim CreditAttribution: joachim commentedDuplicate of #1925922: Unsupported operand types in factory_by_row() in flag_flag.inc.
Please, somebody do some debugging!!!
Comment #6
mstiHave the same error with : flag 7.x-3.5
Comment #7
lunk rat CreditAttribution: lunk rat commentedWould this have anything to do with a namespace conflict? I am getting this error when I name my module functions "mymodule_rules_something" but when I rename the functions to "mymodule_something" (without 'rules') I no longer see the error.
Comment #8
rubymuse CreditAttribution: rubymuse commentedI am experiencing this on a site in development. After clearing caches, the error suddenly showed up:
Fatal error: Unsupported operand types in sites\all\modules\flag\includes\flag\flag_flag.inc on line 132
I commented out the code I've been working on for the past several hours (having nothing to do with flags); no change.
I'm using Flag version = "7.x-3.6" with several node flags. I'm not aware of having any Flag 'ecosystem' modules installed.
After manually disabling the module and clearing caches in the database, I got these messages when reloading the site:
And I've since determined that disabling the module and clearing just cache_bootstrap brings the site back.
Sure hope that helps...I miss my Flags.
Comment #9
dang42 CreditAttribution: dang42 commentedJust got the same error as rubymuse - caused WSOD on my local version (but not the version on the server ... yet?)
Attached is a screenshot of what I get when I add the 3-lines of error reporting code to index.php.
I've no clue how to fix this, but I'll be happy to provide as much info as I can to anyone who does. This is a serious issue for me right now, that will become critical if it affects our production site. Any / all help will be much appreciated!
Thanks,
Dan
eta -> using v3.6
eta #2 -> wsod gone by switching to v3.6-dev. I'll still be happy to provide debug info by switching back to 3.6 if it'll help someone track down the source for others.
Comment #10
kambingfazil CreditAttribution: kambingfazil commentedJust update the Flag module, problem solved :D
Comment #11
Louis Delacretaz CreditAttribution: Louis Delacretaz as a volunteer and commentedWith ver 3.6 starting getting this error after clearing all caches.
Fatal error: Unsupported operand types in sites/all/modules/flag/includes/flag/flag_flag.inc on line 132
updated to 3.7 and then "7.x-3.7+2-dev", still getting same error.
Note with each version drush cc all throws 3 warnings prior.
array_merge(): Argument #2 is not an array flag_flag.inc:203 [warning]
Invalid argument supplied for foreach() flag_flag.inc:222 [warning]
array_merge(): Argument #2 is not an array flag_flag.inc:203 [warning]
PHP Fatal error: Unsupported operand types in sites/all/modules/flag/includes/flag/flag_flag.inc on line 132
Is there any other info I can supply?
Like Dan this is on a dev site with is a mirror of a live site.
cheers
Louis
Comment #12
Louis Delacretaz CreditAttribution: Louis Delacretaz as a volunteer and commentedI rolled the database back some 12 hours and the problem went away.
Given this is a dev site that was in the process of having memcached installed as well as running some very development
modules I wonder if some flags got corrupted and caused my issue. We are making extensive use of flags.
However Im now running flag v3.6 and not experiencing any problems. Will report back if the issue re-occurs.
Comment #13
Louis Delacretaz CreditAttribution: Louis Delacretaz as a volunteer and commentederror suddenly came back, then started reporting the same error was occurring in entity.views.inc
Manually clearing the cache table has cleared the error.
Should there be a test for empty options at line 132 or 203?
Comment #14
Naresh Kmr CreditAttribution: Naresh Kmr commentedGot this error in my local environment when I tried to clear cache using drush. (drush cc all).
Manually clearing the cache table has cleared my error as well. Thanks @Louis Delacretaz
Comment #15
slefevre1 CreditAttribution: slefevre1 commentedWhich cache table did you clear manually?
cache
? I truncated that table but it didn't solve the problem. Normally adrush rr
fixes it, but this time it is stubborn.I've been having this problem off and on with backports for years, I wish they would put a check in this, or at least stub out an empty array in
$flag->options()
.Comment #16
slefevre1 CreditAttribution: slefevre1 commentedThis checks to see that it is an array before it merges.
Comment #17
vrwired CreditAttribution: vrwired commentedRan into this issue only on production server... seems issue happens w/ AWS. Comment #13 led to the right patch for us at https://www.drupal.org/project/flag/issues/1925922#comment-12407413