Project

General

Profile

Actions

Patch #38139

closed

Add guard clause to time_tag method to handle nil time

Added by Go MAEDA over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This patch prevents an Internal Server Error from occurring when a nil value is passed to the time_tag method.

For some reason, a table's created_at or updated_at may have an invalid value "0000-00-00 00:00". In this case, a nil value is passed to time_tag and the user encounters an Internal Server Error. This situation has been reported in #12026 and #12826.


Files


Related issues

Related to Redmine - Defect #12026: 500 error on user page after migrating from Trac to RedMine 2.0.3 Closed

Actions
Related to Redmine - Defect #12826: Error viewing some issues: ActionView::Template::Error (undefined method `-' for nil:NilClass): Closed

Actions
Actions #1

Updated by Go MAEDA over 1 year ago

  • Related to Defect #12026: 500 error on user page after migrating from Trac to RedMine 2.0.3 added
Actions #2

Updated by Go MAEDA over 1 year ago

  • Related to Defect #12826: Error viewing some issues: ActionView::Template::Error (undefined method `-' for nil:NilClass): added
Actions #3

Updated by Go MAEDA over 1 year ago

  • File deleted (add-guard-clause-to-time-tag.patch)
Actions #5

Updated by Go MAEDA over 1 year ago

  • Target version set to 5.1.0

Setting the target version to 5.1.0.

Actions #6

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
Actions

Also available in: Atom PDF