Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
0df4c49d
Commit
0df4c49d
authored
Dec 08, 2018
by
Carsten Rose
Browse files
FormAction.php: Fix problem of missing FE_ID and FE COLUMN - not shown in exception.
parent
bd6e6714
Pipeline
#1099
passed with stage
in 1 minute and 32 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/form/FormAction.php
View file @
0df4c49d
...
...
@@ -90,7 +90,8 @@ class FormAction {
foreach
(
$feSpecAction
as
$fe
)
{
// Preparation for Log, Debug
$this
->
store
->
setVar
(
SYSTEM_FORM_ELEMENT
,
Logger
::
formatFormElementName
(
$fe
),
STORE_SYSTEM
);
$this
->
store
->
setVar
(
SYSTEM_FORM_ELEMENT
,
Logger
::
formatFormElementName
(
$fe
),
STORE_SYSTEM
);
// debug
$this
->
store
->
setVar
(
SYSTEM_FORM_ELEMENT_ID
,
$fe
[
FE_ID
],
STORE_SYSTEM
);
// debug
$fe
=
HelperFormElement
::
initActionFormElement
(
$fe
);
...
...
@@ -100,12 +101,15 @@ class FormAction {
}
if
(
isset
(
$fe
[
FE_FILL_STORE_VAR
]))
{
$rows
=
$this
->
evaluate
->
parse
(
$fe
[
FE_FILL_STORE_VAR
]);
$this
->
store
->
setVar
(
SYSTEM_FORM_ELEMENT_COLUMN
,
FE_FILL_STORE_VAR
,
STORE_SYSTEM
);
// debug
$rows
=
$this
->
evaluate
->
parse
(
$fe
[
FE_FILL_STORE_VAR
],
ROW_REGULAR
);
if
(
is_array
(
$rows
))
{
$this
->
store
->
appendToStore
(
$rows
[
0
],
STORE_VAR
);
}
else
{
if
(
!
empty
(
$rows
))
{
throw
new
UserFormException
(
"Invalid statement for 'fillStoreVar': "
.
$fe
[
FE_FILL_STORE_VAR
],
ERROR_INVALID_OR_MISSING_PARAMETER
);
throw
new
UserFormException
(
json_encode
(
[
ERROR_MESSAGE_TO_USER
=>
"Invalid statement for 'fillStoreVar'."
,
ERROR_MESSAGE_SUPPORT
=>
$fe
[
FE_FILL_STORE_VAR
]]),
ERROR_INVALID_OR_MISSING_PARAMETER
);
}
}
$fe
[
FE_FILL_STORE_VAR
]
=
''
;
// do not process the same later on.
...
...
@@ -291,7 +295,7 @@ class FormAction {
return
;
}
if
(
$fe
[
FE_EXPECT_RECORDS
]
===
''
){
if
(
$fe
[
FE_EXPECT_RECORDS
]
===
''
)
{
throw
new
UserFormException
(
"Missing parameter '"
.
FE_EXPECT_RECORDS
.
"'"
,
ERROR_MISSING_EXPECT_RECORDS
);
}
$expect
=
$this
->
evaluate
->
parse
(
$fe
[
FE_EXPECT_RECORDS
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment