projects
/
id3fs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0fe965
)
AudioFile: check year is defined
author
Ian Beckwith
<ianb@erislabs.net>
Sun, 26 Sep 2010 07:14:39 +0000
(08:14 +0100)
committer
Ian Beckwith
<ianb@erislabs.net>
Sun, 26 Sep 2010 07:14:39 +0000
(08:14 +0100)
lib/ID3FS/AudioFile.pm
patch
|
blob
|
history
diff --git
a/lib/ID3FS/AudioFile.pm
b/lib/ID3FS/AudioFile.pm
index
99d4753
..
8d86314
100644
(file)
--- a/
lib/ID3FS/AudioFile.pm
+++ b/
lib/ID3FS/AudioFile.pm
@@
-71,10
+71,8
@@
sub v1genre
sub year
{
my $self=shift;
- my $year=($self->sanitise(
- $self->stripslashes(
- $self->{audiofile}->year())));
- if($year =~/(\d{4})/)
+ my $year=$self->sanitise($self->stripslashes($self->{audiofile}->year()));
+ if(defined($year) && $year =~/(\d{4})/)
{
$year=$1;
}