Warnings during static code analysis using phan:

1) Cannot access protected method \FeedsDateTime::toArray defined at modules/contrib/feeds/plugins/FeedsParser.inc
2) Reference to undeclared constant \DATE_MIN_YEAR. This will cause a thrown Error in php 8.0+.

Comments

Natallia Kazarynava created an issue. See original summary.

Natallia Kazarynava’s picture

Issue summary: View changes
StatusFileSize
new1.33 KB
Natallia Kazarynava’s picture

Version: 7.x-2.9 » 7.x-2.x-dev
Category: Task » Bug report
Issue summary: View changes
StatusFileSize
new856 bytes

I recreated the patch in order to remove unneeded changes which were made earlier in: https://www.drupal.org/project/date/issues/1741062 (first warning is fixed by patch from this issue)

damienmckenna’s picture

Status: Active » Needs review
Issue tags: -PHP8 +PHP 8.0
damienmckenna’s picture

Parent issue: » #3241397: Plan for Date 7.x-2.13
StatusFileSize
new462 bytes
new522 bytes

Having dug through the module this makes complete sense, it's actually a bug that goes back to the Drupal 6 version!

This minor change extracts the integer value from the variable to avoid any possible errors from the variable not have an integer value.

joseph.olstad’s picture

steinmb’s picture

Status: Needs review » Reviewed & tested by the community

Looks right to me. RTBC.

steinmb’s picture

Assigned: Natallia Kazarynava » Unassigned

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you.

I'll commit it to 7.x-3.x separately.

Status: Fixed » Closed (fixed)

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