Commit c6596287 authored by Leigh Stoller's avatar Leigh Stoller

Change some syntax that does not appear to work on old PHP.

parent f39f3177
......@@ -419,7 +419,15 @@ class Instance
}
else
{
return mysql_fetch_array(DBQueryFatal("select value from version_info where name='commithash'"))[0];
$query_result =
DBQueryFatal("select value from version_info ".
"where name='commithash'");
if (!$query_result || !mysql_num_rows($query_result)) {
return date('Y-m-d-H:i:s');
}
$row = mysql_fetch_array($query_result);
return $row[0];
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment