hdlineage / Minecraft-AuthMe-Wordpress-Plugin

A Wordpress plugin that provides web integration with the AuthmeReloaded Minecraft plugin (independent of Wordpress database).
4 stars 1 forks source link

I'll fix compatibility with php 8.0+ (Work in progress) #4

Open Neon3341 opened 2 years ago

Neon3341 commented 2 years ago

This plugin wrote for early php like php5 or php6. So it needs an update. And i've done it)

Dear developer, just integrate this fix to main version. I've update the plugin for full compatibility with php 8.0+ You need to change some lines in config.php in root directory of plugin

Just change lines 36-55 to if(!isset($options['host'])) $options['host'] = ''; if(!isset($options['user'])) $options['user'] = ''; if(!isset($options['pass'])) $options['pass'] = ''; if(!isset($options['db'])) $options['db'] = ''; if(!isset($options['table'])) $options['table'] = ''; if(!isset($options['invite'])) $options['invite'] = ''; if(!isset($options['email'])) $options['email'] = ''; if(!isset($options['captcha'])) $options['captcha'] = 0; if(!isset($options['welcome'])) $options['welcome'] = 'You must have a valid invite code to register.'; if(!isset($options['form-title'])) $options['form-title'] = 'New Account Registration Form'; and change lines 137-148 to $options = get_option( 'minecraft_authme_options' ); //Authme Database Setup define('Authme_DB_NAME', $options['db'], false); define('Authme_TABLE_NAME', $options['table'], false); /** MySQL database username */ define('Authme_DB_USER', $options['user'], false); /** MySQL database password */ define('Authme_DB_PASSWORD', $options['pass'], false); /** MySQL hostname */ define('Authme_DB_HOST', $options['host'], false); //Custom Invitation Code define('Authme_INV_CODE', $options['invite'], false); or you can download php8 compatibility version here minecraft-authme.zip

Neon3341 commented 2 years ago

In general, I found another fatal error when working with php 8, so I continue to work on it