Problem/Motivation

The return statement for getLegacyDrupalVersion() returns a string but the documentation states it is either an int|false.

The return statement:
return $version_string ? substr($version_string, 0, 1) : FALSE;

An admittedly brief and this value seems to be used as a string both in core and migrate_upgrade. Maybe just change the documentation?

Proposed resolution

Remaining tasks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

Issue summary: View changes

Fix errors in IS.

quietone’s picture

Status: Reviewed & tested by the community » Active

Not paying attention to the details today. This is active.

ioana apetri’s picture

Assigned: Unassigned » ioana apetri
ioana apetri’s picture

Assigned: ioana apetri » Unassigned
Status: Active » Needs review
FileSize
856 bytes

If it is admitted, here is the patch of returning string documentation. Please review it.
Thanks:)

maxocub’s picture

Status: Needs review » Needs work

Sorry for kicking this back for such a small nit, but it should be 'A string' and not 'An string'.

ioana apetri’s picture

I'll do it right now.

ioana apetri’s picture

Status: Needs work » Needs review
FileSize
855 bytes

Here is the update. Thanks for the review.

maxocub’s picture

Status: Needs review » Reviewed & tested by the community

Much better, thank you! RTBC, as I'm confident the tests will still be green.

  • catch committed 974d0f9 on 8.6.x
    Issue #2940108 by yo30, quietone, maxocub: getLegacyDrupalVersion()...

  • catch committed 062835e on 8.5.x
    Issue #2940108 by yo30, quietone, maxocub: getLegacyDrupalVersion()...
catch’s picture

Version: 8.6.x-dev » 8.5.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.6.x and cherry-picked to 8.5.x, thanks!

Status: Fixed » Closed (fixed)

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