[PLATFORM] Support of php8.0 #82

Closed
opened 2021-06-17 14:07:57 +02:00 by Ghost · 3 comments

Platform is not supporting Php8.0
PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime()
PHP Fatal error: Uncaught Error: Call to undefined function each()
PHP Fatal error: Uncaught Error: Non-static method GroupManagerFactory::createInstance()
PHP Fatal error: Cannot make non static method Factory::createInstance() static in class GroupManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class LanguageManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserPreferenceManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeSettingsManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class RightManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class GroupUserManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeGroupUserManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class CoordinationObjManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserSessionManagerFactory
PHP Fatal error: Cannot make static method Factory::createInstance() non static in class CacheManagerFactory
PHP Fatal error: Uncaught Error: Call to undefined function formatUrl()
PHP Fatal error: Uncaught Error: Non-static method Navigation::formatUrl() cannot be called statically

Platform is not supporting Php8.0 PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() PHP Fatal error: Uncaught Error: Call to undefined function each() PHP Fatal error: Uncaught Error: Non-static method GroupManagerFactory::createInstance() PHP Fatal error: Cannot make non static method Factory::createInstance() static in class GroupManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class LanguageManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserPreferenceManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeSettingsManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class RightManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class GroupUserManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class NodeGroupUserManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class CoordinationObjManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class UserSessionManagerFactory PHP Fatal error: Cannot make static method Factory::createInstance() non static in class CacheManagerFactory PHP Fatal error: Uncaught Error: Call to undefined function formatUrl() PHP Fatal error: Uncaught Error: Non-static method Navigation::formatUrl() cannot be called statically
Ghost added the
bug
enhancement
master
php8_migration
labels 2021-06-17 14:07:57 +02:00
Author

With Php8.0, Magic Quotes and each() functions have been removed.
Php8 is now checking methods instanciations.

About each() function, the fix has been apllied as follows :
-while (list($key, $callback) = each($callbacks)) {
+foreach ($callbacks as $key => $callback) {

and

-while (list($key) = each($callbacks)) {
+foreach (array_keys($callbacks) as $key) {

About static functions errors, patch has been applied by adding 'public static ' before the static function name in managers files for each class file name where php is complaining.

With Php8.0, Magic Quotes and each() functions have been removed. Php8 is now checking methods instanciations. About each() function, the fix has been apllied as follows : -while (list($key, $callback) = each($callbacks)) { +foreach ($callbacks as $key => $callback) { and -while (list($key) = each($callbacks)) { +foreach (array_keys($callbacks) as $key) { About static functions errors, patch has been applied by adding 'public static ' before the static function name in managers files for each class file name where php is complaining.
Author

Issue fixed.

Issue fixed.
Ghost added the
fixed
label 2021-06-17 14:17:39 +02:00
Author

Pushed to master

Pushed to master
Ghost closed this issue 2021-06-17 14:28:18 +02:00
Sign in to join this conversation.
No description provided.