Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jbrauer’s picture

Issue summary: View changes
douggreen’s picture

Here's the patch. We can't use drupal_map_assoc() here because this is called before it's loaded.

David_Rothstein’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: core-system-list-bootstrap-2474943-2.patch, failed testing.

Fabianx’s picture

Status: Needs work » Needs review
FileSize
832 bytes

Just a quick re-roll ...

Status: Needs review » Needs work

The last submitted patch, 5: 2474943-5.patch, failed testing.

douggreen’s picture

This should fix the test failures about array_combine. It uses similar code that already exists in module_list().

douggreen’s picture

Fabianx’s picture

Status: Needs work » Needs review

Can we use the extended comment from #5, please?

douggreen’s picture

I switched to this comment because it was already in core. I don't care. I thought this comment was just as descriptive and one line shorter. If you feel strongly, please re-roll.

Fabianx’s picture

Status: Needs review » Reviewed & tested by the community

Nope, not strongly:

RTBC, looks great!

Do we need a test for this given the code violates what the doxy says?

David_Rothstein’s picture

Status: Reviewed & tested by the community » Needs review

Hm, well if module_exists() essentially doesn't work at all during the bootstrap phase, that sounds like it would be worth having a test for... It would be a pretty simple test to write, too, I think?

donaldinou’s picture

If the problem is that system_list could return numeric we can patch the module_list function. Because module_list expresively say that it return
An associative array whose keys and values are the names of the modules in the list.

So return a numeric key is definetively a "bug".

stefan.r’s picture

Issue tags: +Needs tests
poker10’s picture

@donaldinou As was mentioned in #2496587-4: module_exists() always returns FALSE during early bootstrap, I agree that it is better to fix this in system_list(), because that code is one level down, so the bug will be fixed directly where it originated. The module_list() itself is not a problem, the problem is in values it gets from system_list(). And the documentation clearly states, that system_list():

 * @return
 *   An associative array of modules or themes, keyed by name. For $type
 *   'bootstrap', the array values equal the keys. For $type 'module_enabled'
 *   or 'theme', the array values are objects representing the respective
 *   database row, with the 'info' property already unserialized.

I have rerolled the patch from #7 and added a simple test, which should fail without the patch. The patch itself (#7) is unchanged. If the test results will be OK, hopefully this can be RTBC again.

The last submitted patch, 15: 2474943-15_test-only.patch, failed testing. View results

mcdruid’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests +RTBM

This looks great, thanks for adding the test!

  • poker10 committed f5a073a on 7.x
    Issue #2474943 by douggreen, poker10, Fabianx, donaldinou: system_list('...
poker10’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -RTBM

Thanks everyone!

Status: Fixed » Closed (fixed)

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