Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
C
Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 918
    • Issues 918
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • Development
  • Core
  • Issues
  • #2297

Closed
Open
Opened Jan 13, 2021 by DaveD@DaveDDeveloper

Undefined index when putting in a contribution thank-you date without a time

Notice: Undefined index: thankyou_date_time in CRM_Contribute_Form_AdditionalInfo::postProcessCommon() (line 275 of .../web/sites/all/modules/civicrm/CRM/Contribute/Form/AdditionalInfo.php).

It's straightforward but there's also a isNull() in there that seems odd so I'm wondering why it's there. It might be because sometimes it's the literal word 'null' and so you don't want to process that.

    if (!empty($params['thankyou_date']) && !CRM_Utils_System::isNull($params['thankyou_date'])) {
      $formatted['thankyou_date'] = CRM_Utils_Date::processDate($params['thankyou_date'], $params['thankyou_date_time']);
    }
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
5.35.0
Milestone
5.35.0
Assign milestone
Time tracking
None
Due date
None
Reference: dev/core#2297