-
Notifications
You must be signed in to change notification settings - Fork 988
Commit
…is use in the name of field
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -597,14 +597,17 @@ protected function _checkintegrity() | |||
// QID field can be more than just QID, like: 886other or 886A1 | ||||
// So we clean it by finding the first alphabetical character | ||||
$sDirtyQid = $aFields[2]; | ||||
preg_match('~[a-zA-Z_]~i', $sDirtyQid, $match, PREG_OFFSET_CAPTURE); | ||||
preg_match('~[a-zA-Z_#]~i', $sDirtyQid, $match, PREG_OFFSET_CAPTURE); | ||||
|
||||
if (isset($match[0][1])) { | ||||
$sQID = substr($sDirtyQid, 0, $match[0][1]); | ||||
} else { | ||||
// It was just the QID.... | ||||
$sQID = $sDirtyQid; | ||||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Collaborator
|
// So for certain question types (for example Text Array) the field name cannot be properly derived |
Dev know it's a bad solution ;)
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Apr 6, 2021
Collaborator
Maybe log it ? In mariadb ist's a dev issue , no need an Exception
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
Shnoulle
Apr 7, 2021
Collaborator
Yes, but here : some real user without development knowledge can not check integrity if we made an error.
Before the fix : they can delete old table (for example), after the fix : it break
Maybe with debug ?
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
olleharstedt
Apr 7, 2021
Author
Collaborator
If we made an error, then we want them to report the bug...?
This comment has been minimized.
This comment has been minimized.
Sorry, something went wrong.
And with subquestion with code
1
,2
etc … and for ranking ?We still unsure it's a qid