Commit dfdd9a07 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Refs #11998 - more specific error message if function not found

parent b83706b1
Pipeline #5057 passed with stages
in 5 minutes and 21 seconds
......@@ -1139,7 +1139,7 @@ class Database {
$dbT3 = $this->store->getVar(SYSTEM_DB_NAME_T3, STORE_SYSTEM);
$sql = "SELECT * FROM `$dbT3`.`tt_content` WHERE `$column` = ?";
$arr = $this->sql($sql, ROW_EXPECT_1, [$uid]);
$arr = $this->sql($sql, ROW_EXPECT_1, [$uid], 'Function "' . $column . '=' . $uid . '" not found or more than one found.');
return ($arr);
}
}
\ No newline at end of file
......@@ -461,9 +461,12 @@ class Report {
// Get tt_content record bodytext
if (isset($functionCache[$rcFunctionName])) {
// Already cached: get it from cache
$bodytextArr = $functionCache[$rcFunctionName];
} else {
// Multi DB setup: check for the correct DB
if (DB_INDEX_T3 != $this->db->getDbIndex()) {
// Current DB is wrong: get DB with DB_INDEX_T3
$db = new Database(DB_INDEX_T3);
} else {
$db = $this->db;
......
Supports Markdown
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