Repository navigation
fix: Use the global PEAR shim in Horde_Form_Action - #47
Merged
Merged
Conversation
Horde\Exception\PEAR is the same class name as Horde\Exception\Pear because PHP class names are case-insensitive, so PEAR::raiseError() here fails when Horde\Exception\Pear was loaded first. The global PEAR class from horde/exception's compat/ classmap (all 3.x releases) provides raiseError() without that clash.
Contributor
Author
|
Companion PR in horde/exception: horde/Exception#7 |
Member
|
Thank you for reporting. However it triggers the question: Where do you encounter pear errors / pear exceptions in production? |
ralflang
self-requested a review
December 5, 2026 12:51
Contributor
Author
|
I encountered this issue while using Imap_Client. I fixed it in horde/Exception and then I looked for places that were affected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lib/Horde/Form/Action.phpimportsHorde\Exception\PEARand callsPEAR::raiseError().Horde\Exception\PEAR(horde/exceptionsrc/PEAR.php) andHorde\Exception\Pear(src/Pear.php) are the same class name in PHP, which treats class names case-insensitively. IfHorde\Exception\Pearwas loaded first,PEAR::raiseError()here is undefined.This removes the import, so the file (which has no namespace) uses the global
PEARclass. horde/exception provides it through itscompat/classmap in all 3.x releases, so this works with current and future horde/exception versions.horde/exception will rename its shim class to resolve the clash; see the companion PR there.