Closed vorpal-buildbot closed 5 years ago
/var/log/apache2/access_log is the access log so I assume /var/log/apache2/error_log is the error log.
/home/discord/gatherling.log is the error log
[Mon Apr 08 04:23:06.373179 2019] [php7:notice] [pid 15167] [client 172.69.23.41:60242] PHP Notice: Trying to get property 'password' of non-object in /home/discord/public_html/gatherling.one/register.php on line 78, referer: https://gatherling.one/register.php
[Mon Apr 08 04:23:06.373267 2019] [php7:warn] [pid 15167] [client 172.69.23.41:60242] PHP Warning: Creating default object from empty value in /home/discord/public_html/gatherling.one/register.php on line 82, referer: https://gatherling.one/register.php
[Mon Apr 08 04:23:06.381838 2019] [php7:error] [pid 15167] [client 172.69.23.41:60242] PHP Fatal error: Uncaught Error: Call to undefined method stdClass::save() in /home/discord/public_html/gatherling.one/register.php:87\nStack trace:\n#0 /home/discord/public_html/gatherling.one/register.php(26): doRegister()\n#1 /home/discord/public_html/gatherling.one/register.php(14): content()\n#2 {main}\n thrown in /home/discord/public_html/gatherling.one/register.php on line 87, referer: https://gatherling.one/register.php
Cannot repro on local.
The problem is that $player = Player::findOrCreateByName($_POST['username']);
returns NULL. Which I guess is theoretically not possible.
MariaDB [gatherli_gatherling]> INSERT INTO players (name) VALUES ('bakertsupertest');
ERROR 1364 (HY000): Field 'email_privacy' doesn't have a default value
might be the root cause here.
The database thinks it is up to date even though v23 adds a default value of 0 for this field. So not sure how we got in this mangled state.
Ran ALTER TABLE
playersCHANGE COLUMN
email_privacy`email_privacy
TINYINT(3) NOT NULL DEFAULT '0';` manually to fix things up but I'm concerned other db upgrades may have been skipped causing other issues.
Leaving this open to check other db upgrades. Registration now works.
OK well I didn't find any problems in the last eleven changes except that one. Confused but closing.
Reported on Discord by bakert#2193