Skip to content
Snippets Groups Projects
Commit dfdd9a07 authored by Carsten  Rose's avatar Carsten Rose
Browse files

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

parent b83706b1
No related branches found
No related tags found
2 merge requests!323Develop,!321F11998 custom qfq function
Pipeline #5057 passed
...@@ -1139,7 +1139,7 @@ class Database { ...@@ -1139,7 +1139,7 @@ class Database {
$dbT3 = $this->store->getVar(SYSTEM_DB_NAME_T3, STORE_SYSTEM); $dbT3 = $this->store->getVar(SYSTEM_DB_NAME_T3, STORE_SYSTEM);
$sql = "SELECT * FROM `$dbT3`.`tt_content` WHERE `$column` = ?"; $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); return ($arr);
} }
} }
\ No newline at end of file
...@@ -461,9 +461,12 @@ class Report { ...@@ -461,9 +461,12 @@ class Report {
// Get tt_content record bodytext // Get tt_content record bodytext
if (isset($functionCache[$rcFunctionName])) { if (isset($functionCache[$rcFunctionName])) {
// Already cached: get it from cache
$bodytextArr = $functionCache[$rcFunctionName]; $bodytextArr = $functionCache[$rcFunctionName];
} else { } else {
// Multi DB setup: check for the correct DB
if (DB_INDEX_T3 != $this->db->getDbIndex()) { if (DB_INDEX_T3 != $this->db->getDbIndex()) {
// Current DB is wrong: get DB with DB_INDEX_T3
$db = new Database(DB_INDEX_T3); $db = new Database(DB_INDEX_T3);
} else { } else {
$db = $this->db; $db = $this->db;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment