Commit f416e94d authored by Marc Egger's avatar Marc Egger
Browse files

Refs #10120 fix bug: isFormOrFormElement returned "" instead of false since...

Refs #10120 fix bug: isFormOrFormElement returned "" instead of false since return type was ": string"
parent c5132b1f
Pipeline #3607 failed with stages
in 50 seconds
......@@ -26,7 +26,7 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
// TODO: add fileStats column to Form schema
// TODO: move Constants to Constants.php if this file is actually used
// TODO: extract all sql queries and make them reusable
// TODO: write tests
// TODO: write tests (file test https://medium.com/weebly-engineering/phpunit-mocking-the-file-system-using-vfsstream-5d7d79b1eb2a)
// TODO: maybe: update button in form list which removes forms from DB if their file was deleted
// TODO: Carsten Fragen: add log messages somewhare?
......@@ -47,8 +47,8 @@ use IMATHUZH\Qfq\Core\Helper\SqlQuery;
/////// DEBUG /////////
// throw new \UserFormException(json_encode([
// ERROR_MESSAGE_TO_USER => json_encode([$pathFileName, file_exists($pathFileName), getcwd()], JSON_PRETTY_PRINT),
// ERROR_MESSAGE_TO_DEVELOPER => json_encode([$pathFileName, file_exists($pathFileName)], JSON_PRETTY_PRINT)
// ERROR_MESSAGE_TO_USER => json_encode([], JSON_PRETTY_PRINT),
// ERROR_MESSAGE_TO_DEVELOPER => json_encode([], JSON_PRETTY_PRINT)
// ]));
///////////////////////
......@@ -300,8 +300,9 @@ class FormAsFile
* @throws \DbException
* @throws \UserFormException
*/
public static function isFormOrFormElement(int $recordId, string $recordTable, Database $database): string
public static function isFormOrFormElement(int $recordId, string $recordTable, Database $database)
{
$recordId = intval($recordId);
if ($recordId === 0) {
return false;
}
......
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