Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | feeds-require-to-require-once-1693592-1.patch | 1.01 KB | slefevre1 |
Comments
Comment #1
slefevre1 CreditAttribution: slefevre1 commentedHere is a patch that changes the `require`s to `require_once`s.
Comment #2
twistor CreditAttribution: twistor commentedAnywhere 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.
Comment #3
MegaChriz CreditAttribution: MegaChriz at WebCoo commentedThis is still a valid issue. Libraries in "sites/all/libraries" can be shared by other modules.