Problem/Motivation

Since updating to 4.1.1 I am getting the following warnings when saving a node with a repeating date.

Warning: Undefined array key "time_wrapper" in Drupal\smart_date_recur\Entity\SmartDateRule::validateRecurring() (line 925 of /var/www/html/web/modules/contrib/smart_date/modules/smart_date_recur/src/Entity/SmartDateRule.php)

Warning: Trying to access array offset on value of type null in Drupal\smart_date_recur\Entity\SmartDateRule::validateRecurring() (line 925 of /var/www/html/web/modules/contrib/smart_date/modules/smart_date_recur/src/Entity/SmartDateRule.php)

Steps to reproduce

Update to 4.1.1
Open a node with a repeating date which ends "On Date"
Click save.

Proposed resolution

I haven't had a good look through the code so I don't want to suggest changes but I assume these errors are coming from the changes from this issue: https://www.drupal.org/project/smart_date/issues/3413612

Issue fork smart_date-3444046

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tisteegz created an issue. See original summary.

akhil_01’s picture

Assigned: Unassigned » akhil_01

mandclu made their first commit to this issue’s fork.

akhil_01’s picture

Assigned: akhil_01 » Unassigned
mandclu’s picture

Status: Active » Needs review

Here's a quick patch that should resolve the warnings. Please test it and let me know.

rollins’s picture

Status: Needs review » Reviewed & tested by the community

MP provided by @mandclu fixed the warning message
I think this can be merged

mandclu’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the feedback. Merged in.

  • mandclu committed 3898ebfe on 4.1.x
    Issue #3444046 by mandclu: Warning: Undefined array key "time_wrapper"
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.