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.
The exact error is:
warning: array_key_exists(): The second argument should be either an array or an object in /srv/www/htdocs/dpsych/sites/all/modules/date/date_timezone/date_timezone.module on line 144.
The problem is that another module (it is completely un-related to date) is unset($form['timezone']) for the profile form. Thus when date_timezone_user_form_after_build is called the error is produced.
IMO The fix would be to add an is_array check. I would submit a patch but I don't know what the process to do that is.
Thank you for your time and help.
Comment | File | Size | Author |
---|---|---|---|
#1 | date_timezone.patch | 773 bytes | blit32 |
Comments
Comment #1
blit32 CreditAttribution: blit32 commentedComment #2
KarenS CreditAttribution: KarenS commentedI'm not sure I want to fix this. If some other module is unsetting that, it will wreck the way that Date API is tracking timezones and cause lots of problems bigger than a PHP error. The Date API has to be able to set timezones and know that they are working. If you have a module that is interfering with this, you have a module that is incompatible with the Date API. You either need to file a report on that module's page to try to fix it or not use them together.
Comment #3
Simon Shine CreditAttribution: Simon Shine commentedJudging from what KarenS says, I agree.
However, if one should want to make these dirty checks, there is also one on line 514 of includes/date_api_filter_handler.inc.