0034829: Graph plugin: deprecated strftime() in View Issues > issue trends - MantisBT

View Issue Details

IDProjectCategoryView StatusDate SubmittedLast Update
0034829mantisbtplug-inspublic2024年10月08日 23:232026年08月21日 19:27
Reporteramphetamine Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
OSwindowsOS Version10 
Target Version2.29.0Fixed in Version2.29.0 
Summary0034829: Graph plugin: deprecated strftime() in View Issues > issue trends
Description

view issues > issue trends > drop list select the date

DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 192
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 193
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 249
DEPRECATED: 'Function strftime() is deprecated' in '...\xampp\htdocs\mantis\plugins\MantisGraph\core\Period.php' line 258

when selec arbitrary date, the field cannot be keyed in

TagsPHP 8.1
Attached Files

Relationships

related to  0025681 resolved dregad   Problem with date range filter in MantisGraph issues_trend_page.php 
has duplicate  0037136 closed dregad   Replace deprecated strftime() with date() in MantisGraph Period class 

Activities

dregad

2024年10月09日 06:01

developer   ~0069319

when selec arbitrary date, the field cannot be keyed in

@amphetamine , this bug has been reported in the past, see 0025681 - you even posted in that thread... See 0025681:0061837 for root cause analysis.

With regards to the strftime() deprecation warnings, thanks reporting the issue; I'll use this issue to track that, and change the summary accordingly.

dregad

2025年02月25日 20:29

developer   ~0069922

Issue resolved by mistake due to pushing a work-in-progress branch to the mantisbt repository instead of my own fork. Sorry about the noise.

Related Changesets

MantisBT: master 92d4e16c

2024年10月11日 13:10

dregad


Details Diff Refactor the Period class to use DateTime objects

The code now relies on DateTimeImmutable::modify() instead of custom
logic based on strftime(), mktime() and getdate() to calculate the
various period types' start and end timestamps.

This fixes the deprecation warnings caused by calls to strftime() on
PHP 8.1 or later.

The methods returning formatted dates now use $g_normal_date_format
config, instead of hardcoded, custom date formats. This fixes display
of the selected date in the input fields when reloading the page after
submitting the form.

Code cleanup: fix static analysis warnings, improve PHPDoc.

Fixes 0034829 Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master 191d9c83

2024年10月22日 08:11

dregad


Details Diff Period end cannot be in the future

Fixes 0034829 Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master 6b73820b

2024年10月22日 08:22

dregad


Details Diff Use constants for Period names

Fixes 0034829 Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File

MantisBT: master e6c6697e

2024年10月22日 08:25

dregad


Details Diff Don't display Period dates when type is None

Fixes 0034829 Affected Issues
0034829
mod - plugins/MantisGraph/core/Period.php Diff File
Powered by MantisBT 2.29.0-dev-master-e4ff7ef87
Copyright © 2000 - 2026 MantisBT Team
Contact administrator for assistance
Page execution time: 0.1824 seconds    

AltStyle によって変換されたページ (->オリジナル) /