View Issue Details

IDProjectCategoryView StatusLast Update
0013576Tine 2.0Tinebasepublic2018-02-23 13:47
ReporteringoratsdorfAssigned Topschuele 
PriorityhighSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Platformi386OSlinuxOS Version3.2.0-24
Product Versiongit master 
Target Version2018.02.2 Community EditionFixed in Version2018.02.2 Community Edition 
Summary0013576: support PHP 7.2
DescriptionPHP7.2: The each() function is deprecated.

Tinebase_Core::errorHandler::579 The each() function is deprecated. This message will be suppressed on further calls in /var/wwwroot/tine20/vendor/zendframework/zendframework1/library/Zend/Cache/Backend.php::79 (8192)
Tinebase_Core::errorHandler::580 #0 [internal function]: Tinebase_Core::errorHandler(8192, 'The each() func...', '/var/wwwroot/ti...', 79, Array)
#1 /var/wwwroot/tine20/vendor/zendframework/zendframework1/library/Zend/Cache/Backend.php(79): each(Array)
0000002 /var/wwwroot/tine20/vendor/zendframework/zendframework1/library/Zend/Cache/Backend/Redis.php(363): Zend_Cache_Backend->setDirectives(Array)
#3 /var/wwwroot/tine20/vendor/zendframework/zendframework1/library/Zend/Cache/Core.php(183): Zend_Cache_Backend_Redis->setDirectives(Array)
0000004 /var/wwwroot/tine20/vendor/zendframework/zendframework1/library/Zend/Cache.php(111): Zend_Cache_Core->setBackend(Object(Zend_Cache_Backend_Redis))
#5 /var/wwwroot/tine20/Tinebase/Core.php(802): Zend_Cache::factory('Core', 'Redis', Array, Array)
#6 /var/wwwroot/tine20/Tinebase/Core.php(1363): Tinebase_Core::setupCache()
#7 /var/wwwroot/tine20/Tinebase/Core.php(1676): Tinebase_Core::getCache()
0000008 /var/wwwroot/tine20/Tinebase/Core.php(1744): Tinebase_Core::_searchServerPlugins()
#9 /var/wwwroot/tine20/Tinebase/Core.php(255): Tinebase_Core::_getServerPlugins()
0000010 /var/wwwroot/tine20/Tinebase/Core.php(235): Tinebase_Core::getDispatchServer(Object(Zend\Http\PhpEnvironment\Request))
#11 /var/wwwroot/tine20/tine20.php(73): Tinebase_Core::dispatchRequest()
0000012 {main}
Steps To ReproduceUpdate from PHP7.1 to 7.2
Additional InformationThis will fix it:

    public function setDirectives($directives)
    {
        if (!is_array($directives)) Zend_Cache::throwException('Directives parameter must be an array');
        foreach ($directives as $name => $value) {
// while (list($name, $value) = each($directives)) {
            if (!is_string($name)) {
                Zend_Cache::throwException("Incorrect option name : $name");
            }
            $name = strtolower($name);
            if (array_key_exists($name, $this->_directives)) {
                $this->_directives[$name] = $value;
            }

        }

        $this->_loggerSanity();
    }
TagsNo tags attached.
mwticket

Activities

ingoratsdorf

ingoratsdorf

2017-10-23 00:46

developer   ~0021030

Found some more, created https://github.com/tine20/Tine-2.0-Open-Source-Groupware-and-CRM/pull/29
pschuele

pschuele

2017-11-03 10:33

administrator   ~0021074

thanks for the PR. I'll merge that after a short review.
pschuele

pschuele

2017-12-14 08:54

administrator   ~0021248

postponed this. there is lot's of stuff to be changed for php 7.2 :(
frozn

frozn

2018-02-14 21:23

reporter   ~0021412

after fixing the following functions (interface errors) it works fine under php 7.2 so far:

\tine\Tasks\Controller\Task.php -> create/update
\tine\Tinebase\Acl\Roles.php -> getMultiple
\tine\Tinebase\PersistentFilter.php -> create
\tine\Calendar\Controller\Resource.php -> create
pschuele

pschuele

2018-02-15 14:38

administrator   ~0021414

ok, great.

i think, i'll finish the change until the next release (2018.02.2).

Issue History

Date Modified Username Field Change
2017-10-22 03:18 ingoratsdorf New Issue
2017-10-23 00:46 ingoratsdorf Note Added: 0021030
2017-10-28 10:10 ingoratsdorf Assigned To => ingoratsdorf
2017-10-28 10:10 ingoratsdorf Status new => assigned
2017-11-03 10:33 pschuele Note Added: 0021074
2017-11-03 10:56 pschuele Summary PHP7.2: The each() function is deprecated. => support PHP 7.2
2017-11-03 10:56 pschuele Description Updated View Revisions
2017-11-03 11:45 pschuele Assigned To ingoratsdorf => pschuele
2017-11-03 11:45 pschuele Status assigned => gerrit
2017-11-03 11:45 pschuele Target Version => 2017.11.1 Caroline Business Edition
2017-11-23 11:35 pschuele Target Version 2017.11.1 Caroline Business Edition => 2017.08.10 Community Edition
2017-12-14 08:54 pschuele Target Version 2017.08.10 Community Edition => 2017.08.11 Community Edition
2017-12-14 08:54 pschuele Note Added: 0021248
2018-01-18 09:51 pschuele Target Version 2017.08.11 Community Edition => 2018.02.1 Community Edition
2018-02-08 11:48 pschuele Target Version 2018.02.1 Community Edition => 2018.02.2 Community Edition
2018-02-14 21:23 frozn Note Added: 0021412
2018-02-15 14:38 pschuele Note Added: 0021414
2018-02-23 13:47 pschuele Status gerrit => resolved
2018-02-23 13:47 pschuele Resolution open => fixed
2018-02-23 13:47 pschuele Fixed in Version => 2018.02.2 Community Edition