New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0013576: support PHP 7.2 #6715

Closed
Gloirin opened this Issue Jun 9, 2018 · 6 comments

Comments

Projects
None yet
1 participant
@Gloirin

Gloirin commented Jun 9, 2018

Reported by ingoratsdorf on 22 Oct 2017 01:18

Version: git master

PHP7.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)
#2 /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)
#4 /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()
#8 /var/wwwroot/tine20/Tinebase/Core.php(1744): Tinebase_Core::_searchServerPlugins()
#9 /var/wwwroot/tine20/Tinebase/Core.php(255): Tinebase_Core::_getServerPlugins()
#10 /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()
#12 {main}

Steps to reproduce: Update from PHP7.1 to 7.2

Additional information: This 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();
}

@Gloirin Gloirin added this to the 2018.02.2 Community Edition milestone Jun 9, 2018

@Gloirin Gloirin self-assigned this Jun 9, 2018

@Gloirin Gloirin closed this Jun 9, 2018

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by ingoratsdorf on 22 Oct 2017 22:46

Found some more, created #29

Gloirin commented Jun 11, 2018

Comment posted by ingoratsdorf on 22 Oct 2017 22:46

Found some more, created #29

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 3 Nov 2017 09:33

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

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 3 Nov 2017 09:33

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

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 3 Nov 2017 10:45

https://gerrit.tine20.com/customers/6203

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 3 Nov 2017 10:45

https://gerrit.tine20.com/customers/6203

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 14 Dec 2017 07:54

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

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 14 Dec 2017 07:54

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

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by frozn on 14 Feb 2018 20:23

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

Gloirin commented Jun 11, 2018

Comment posted by frozn on 14 Feb 2018 20:23

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

@Gloirin

This comment has been minimized.

Show comment
Hide comment
@Gloirin

Gloirin Jun 11, 2018

Comment posted by pschuele on 15 Feb 2018 13:38

ok, great.

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

Gloirin commented Jun 11, 2018

Comment posted by pschuele on 15 Feb 2018 13:38

ok, great.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment