Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
f630564b
Commit
f630564b
authored
10 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Issue #2390199 by GuyPaddock: Unhelpful failure upon uploading an empty CSV file
parent
fce13c29
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/FeedsCSVParser.inc
+2
-1
2 additions, 1 deletion
plugins/FeedsCSVParser.inc
with
2 additions
and
1 deletion
plugins/FeedsCSVParser.inc
+
2
−
1
View file @
f630564b
...
@@ -28,7 +28,8 @@ class FeedsCSVParser extends FeedsParser {
...
@@ -28,7 +28,8 @@ class FeedsCSVParser extends FeedsParser {
// Get first line and use it for column names, convert them to lower case.
// Get first line and use it for column names, convert them to lower case.
$header
=
$this
->
parseHeader
(
$parser
,
$iterator
);
$header
=
$this
->
parseHeader
(
$parser
,
$iterator
);
if
(
!
$header
)
{
if
(
!
$header
)
{
return
FeedsParserResult
();
drupal_set_message
(
t
(
'The CSV file is empty.'
),
'warning'
,
FALSE
);
return
new
FeedsParserResult
();
}
}
$parser
->
setColumnNames
(
$header
);
$parser
->
setColumnNames
(
$header
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment