Closed dannythunder closed 4 years ago
The issue is that empty sql expression.
lib/class_coach.php:397
$query = "SELECT l.lid AS 'lid', d.did AS 'did', t.tour_id AS 'trid',".implode(',',$properFields)."
FROM leagues AS l LEFT JOIN divisions AS d ON d.f_lid = l.lid LEFT JOIN tours AS t ON t.f_did = d.did ".
((!$GLOBAL_VIEW) ? "LEFT JOIN memberships AS m ON m.lid = l.lid WHERE m.cid = $cid" : '') . ' GROUP BY l.name ASC, did DESC, trid DESC';
$result = mysql_query($query);
Which fails here:
lib/class_coach.php:416
while ($r = mysql_fetch_object($result)) {
This might have to do with the latest release. I've downloaded master branch, new problems. Investigating that problem now. Keeping this open in case the problem exists it master.
Closing this. Problem is in the latest release. Working in master, and the other problem is patched by me and created a PR
Trying to delete the default message about changing root password:This appears at login, some actions doesn't work. Like deleting the default news post.I can create a team, so not everything is broken.
This is the query being ran:
The sql error:
If I remove the GROUP BY the query come back empty:
MySQL returned an empty result set (i.e. zero rows). (Query took 0.0009 seconds.)
PHP version 5.6,
Spun up a new server running php 7.4 and ran install.php, renamed it, tried to enter the site:
[php7:error] [client xyz.zyx:59943] PHP Fatal error: Uncaught TypeError: Argument 1 passed to mysql_fetch_object() must be an instance of mysqli_result, bool given, called in /bloodbowl/lib/class_coach.php on line 415 and defined in /bloodbowl/lib/mysqli_wrapper.php:135\nStack trace:\n#0 /bloodbowl/lib/class_coach.php(415): mysql_fetch_object()\n#1 /bloodbowl/lib/misc_functions.php(45): Coach::allowedNodeAccess()\n#2 /bloodbowl/header.php(172): setupGlobalVars()\n#3 /bloodbowl/index.php(6): require('/bloodbowl/h...')\n#4 {main}\n thrown in /bloodbowl/lib/mysqli_wrapper.php on line 135