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
9c3482f0
Commit
9c3482f0
authored
Jan 18, 2019
by
Carsten Rose
Browse files
Try to fix an uninitialised variable for upload
parent
53ea44f5
Pipeline
#1369
passed with stage
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Source/core/Save.php
View file @
9c3482f0
...
...
@@ -347,7 +347,7 @@ class Save {
$sip
=
new
Sip
(
false
);
$newValues
=
array
();
$vars
=
array
();
$vars
=
array
();
$formValues
=
$this
->
store
->
getStore
(
STORE_FORM
);
$primaryRecord
=
$this
->
store
->
getStore
(
STORE_RECORD
);
// necessary to check if the current formElement exist as a column of the primary table.
...
...
@@ -369,20 +369,20 @@ class Save {
}
$column
=
$formElement
[
FE_NAME
];
$pathFileName
=
$this
->
doUpload
(
$formElement
,
$formValues
[
$column
],
$sip
,
$modeUpload
);
$pathFileName
=
$this
->
doUpload
(
$formElement
,
(
$formValues
[
$column
]
??
''
)
,
$sip
,
$modeUpload
);
if
(
$modeUpload
==
UPLOAD_MODE_DELETEOLD
&&
$pathFileName
==
''
){
$pathFileNameTmp
=
''
;
// see '4'
if
(
$modeUpload
==
UPLOAD_MODE_DELETEOLD
&&
$pathFileName
==
''
)
{
$pathFileNameTmp
=
''
;
// see '4'
}
else
{
if
(
empty
(
$pathFileName
))
{
$pathFileNameTmp
=
$primaryRecord
[
$column
]
??
''
;
// see '3'. Attention: in case of Advanced Upload, $primaryRecord[$column] does not exist.
$pathFileNameTmp
=
$primaryRecord
[
$column
]
??
''
;
// see '3'. Attention: in case of Advanced Upload, $primaryRecord[$column] does not exist.
}
else
{
$pathFileNameTmp
=
$pathFileName
;
// see '1,2,5'
}
}
// Get latest file information
if
(
$pathFileNameTmp
==
''
)
{
if
(
$pathFileNameTmp
==
''
)
{
// No new upload and no existing: take care to remove previous upload file statistics.
$this
->
store
->
unsetVar
(
VAR_FILE_MIME_TYPE
,
STORE_VAR
);
$this
->
store
->
unsetVar
(
VAR_FILE_SIZE
,
STORE_VAR
);
...
...
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