I wrote a custom feeds fetcher as a separate module. When I enabled it and ran the import, I got an error

PHP Fatal error: require(): Cannot redeclare class pushsubscriber in .../modules/contrib/feeds/feeds.module on line 948

This line has a require instead of require_once. Apparently somewhere my custom feeds fetcher is already loading the pushsubscriber class, which is causing the second call to die.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

slefevre1’s picture

Here is a patch that changes the `require`s to `require_once`s.

twistor’s picture

Version: 7.x-2.0-alpha5 » 7.x-2.x-dev
Status: Active » Needs work

Anywhere you are including libraries, you should be using feeds_include_library(). Adding a require_once only masks the situation, since it hides the fact that PuSHSubscriber.inc is being loaded some other way.

MegaChriz’s picture

Issue summary: View changes

This is still a valid issue. Libraries in "sites/all/libraries" can be shared by other modules.