Bug 261743 - www/horde-base: errors with PHP-80 in devel/pear-Horde_Injector
Summary: www/horde-base: errors with PHP-80 in devel/pear-Horde_Injector
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: horde
URL: https://bugs.horde.org/ticket/15094
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-06 11:46 UTC by Thierry Thomas
Modified: 2022-02-22 18:15 UTC (History)
1 user (show)

See Also:
thierry: maintainer-feedback-


Attachments
Do not use with PHP 8.x (576 bytes, patch)
2022-02-07 08:26 UTC, Thierry Thomas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2022-02-06 11:46:34 UTC
After switching from php-74 to php-80, Horde apps do not work anymore: they cause HTTP ERROR 500.

Message in httpd-error.log is:

[php:error] [pid 2944] [client 127.0.0.1:22043] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Horde_ErrorHandler::errorHandler(), 4 passed in /usr/local/share/pear/Horde/Injector/DependencyFinder.php on line 61 and exactly 5 expected in /usr/local/share/pear/Horde/ErrorHandler.php:153\nStack trace:\n#0 /usr/local/share/pear/Horde/Injector/DependencyFinder.php(61): Horde_ErrorHandler::errorHandler(8192, 'Method Reflecti...', '/usr/local/shar...', 61)\n#1 /usr/local/share/pear/Horde/Injector/DependencyFinder.php(42): Horde_Injector_DependencyFinder->getParameterDependency(Object(Horde_Injector), Object(ReflectionParameter))\n#2 /usr/local/share/pear/Horde/Injector/Binder/Implementation.php(88): Horde_Injector_DependencyFinder->getMethodDependencies(Object(Horde_Injector), Object(ReflectionMethod))\n#3 /usr/local/share/pear/Horde/Injector/Binder/Implementation.php(70): Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector), Object(ReflectionClass))\n#4 /usr/local/share/pear/Horde/Injector/Binder/AnnotatedSetters.php(78): Horde_Injector_Binder_Implementation->create(Object(Horde_Injector))\n#5 /usr/local/share/pear/Horde/Injector.php(238): Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector))\n#6 /usr/local/share/pear/Horde/Injector.php(272): Horde_Injector->createInstance('Horde_Core_Fact...')\n#7 /usr/local/share/pear/Horde/Injector.php(267): Horde_Injector->getInstance('Horde_Core_Fact...')\n#8 /usr/local/share/pear/Horde/Injector/Binder/Factory.php(119): Horde_Injector->getInstance('Horde_Core_Fact...')\n#9 /usr/local/share/pear/Horde/Injector.php(238): Horde_Injector_Binder_Factory->create(Object(Horde_Injector))\n#10 /usr/local/share/pear/Horde/Injector.php(272): Horde_Injector->createInstance('Horde_Log_Logge...')\n#11 /usr/local/share/pear/Horde.php(82): Horde_Injector->getInstance('Horde_Log_Logge...')\n#12 /usr/local/share/pear/Horde/ErrorHandler.php(74): Horde::log(Object(ErrorException), 'EMERG')\n#13 /usr/local/share/pear/Horde/ErrorHandler.php(209): Horde_ErrorHandler::fatal(Object(ErrorException))\n#14 [internal function]: Horde_ErrorHandler::catchFatalError()\n#15 {main}\n  thrown in /usr/local/share/pear/Horde/ErrorHandler.php on line 153

and `php /usr/local/www/horde/test.php` displays the following:
                                                                       
  Fatal Error:                                                         
  Too few arguments to function Horde_ErrorHandler::errorHandler(), 4  
     passed and exactly 5 expected                                     
  In /usr/local/share/pear/Horde/ErrorHandler.php on line 153          
                                                                       
  1. Horde_Registry::appInit() /usr/local/www/horde/test.php:49        
  2. Horde_Registry->__construct()                                     
     /usr/local/share/pear/Horde/Registry.php:287                      
  3. Horde_Registry->importConfig()                                    
     /usr/local/share/pear/Horde/Registry.php:480                      
  4. Horde_Registry_Hordeconfig->toArray()                             
     /usr/local/share/pear/Horde/Registry.php:1773                     
  5. Horde_Registry_Hordeconfig->_load()                               
     /usr/local/share/pear/Horde/Registry/Hordeconfig.php:65           
  6. Horde_Registry_Loadconfig->__construct()                          
     /usr/local/share/pear/Horde/Registry/Hordeconfig.php:78           
  7. include() /usr/local/share/pear/Horde/Registry/Loadconfig.php:79  
  8. Horde_ErrorHandler::errorHandler()                                
     /usr/local/share/pear/Horde/Registry/Loadconfig.php:79
Comment 1 Marc 2022-02-07 05:49:33 UTC
Me too i have the same thing
07-Feb-2022 06:48:22 Europe/Paris] PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Horde_ErrorHandler::errorHandler(), 4 passed in /usr/local/share/pear/Horde/Injector/DependencyFinder.php on line 61 and exactly 5 expected in /usr/local/share/pear/Horde/ErrorHandler.php:153
Stack trace:
#0 /usr/local/share/pear/Horde/Injector/DependencyFinder.php(61): Horde_ErrorHandler::errorHandler(8192, 'Method Reflecti...', '/usr/local/shar...', 61)
#1 /usr/local/share/pear/Horde/Injector/DependencyFinder.php(42): Horde_Injector_DependencyFinder->getParameterDependency(Object(Horde_Injector), Object(ReflectionParameter))
#2 /usr/local/share/pear/Horde/Injector/Binder/Implementation.php(88): Horde_Injector_DependencyFinder->getMethodDependencies(Object(Horde_Injector), Object(ReflectionMethod))
#3 /usr/local/share/pear/Horde/Injector/Binder/Implementation.php(70): Horde_Injector_Binder_Implementation->_getInstance(Object(Horde_Injector), Object(ReflectionClass))
#4 /usr/local/share/pear/Horde/Injector/Binder/AnnotatedSetters.php(78): Horde_Injector_Binder_Implementation->create(Object(Horde_Injector))
#5 /usr/local/share/pear/Horde/Injector.php(238): Horde_Injector_Binder_AnnotatedSetters->create(Object(Horde_Injector))
#6 /usr/local/share/pear/Horde/Injector.php(272): Horde_Injector->createInstance('Horde_Core_Fact...')
#7 /usr/local/share/pear/Horde/Injector.php(267): Horde_Injector->getInstance('Horde_Core_Fact...')
#8 /usr/local/share/pear/Horde/Injector/Binder/Factory.php(119): Horde_Injector->getInstance('Horde_Core_Fact...')
#9 /usr/local/share/pear/Horde/Injector.php(238): Horde_Injector_Binder_Factory->create(Object(Horde_Injector))
#10 /usr/local/share/pear/Horde/Injector.php(272): Horde_Injector->createInstance('Horde_Log_Logge...')
#11 /usr/local/share/pear/Horde.php(82): Horde_Injector->getInstance('Horde_Log_Logge...')
#12 /usr/local/share/pear/Horde/ErrorHandler.php(74): Horde::log(Object(ErrorException), 'EMERG')
#13 /usr/local/share/pear/Horde/ErrorHandler.php(209): Horde_ErrorHandler::fatal(Object(ErrorException))
#14 [internal function]: Horde_ErrorHandler::catchFatalError()
#15 {main}
  thrown in /usr/local/share/pear/Horde/ErrorHandler.php on line 153
Comment 2 Thierry Thomas freebsd_committer freebsd_triage 2022-02-07 08:26:20 UTC
Created attachment 231597 [details]
Do not use with PHP 8.x

This issue will be addressed by the Horde project. Meanwhile we should restrict these ports to PHP 7.x.
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2022-02-22 18:15:16 UTC
Just committed.

Note: a patch is available at
https://github.com/horde/Core/commit/1ec6fa6d150257a1eac64d6cc987a79656d6a0dc
It could be back-ported, but I have not tested enough all the different applications to be sure that it would be sufficient for Horde to become compatible with PHP-8.
Comment 4 commit-hook freebsd_committer freebsd_triage 2022-02-22 18:15:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=63890f850d7d87d0b7699feff64ccd797072481d

commit 63890f850d7d87d0b7699feff64ccd797072481d
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-02-07 08:17:07 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-02-22 18:15:02 +0000

    www/horde-base: do not use with PHP 8.x

    Note: a patch is available at
    https://github.com/horde/Core/commit/1ec6fa6d150257a1eac64d6cc987a79656d6a0dc
    It could be back-ported, but I have not tested enough all the different
    applications to be sure that it would be sufficient for Horde to become
    compatible with PHP-8.

    PR:             261743
    Approved by:    maintainer’s time-out

 www/horde-base/Makefile | 1 +
 1 file changed, 1 insertion(+)