diff options
author | intrigeri <intrigeri@boum.org> | 2010-07-11 12:28:02 +0200 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2010-07-11 12:28:02 +0200 |
commit | 4449a70214b561da14f8e566f2747517c941cb40 (patch) | |
tree | efb22f095a342252e6e7c7d044d2b08ba92a8250 /IkiWiki | |
parent | 98cc9460ac67fee606437712882cfa1e5d259729 (diff) |
po: check validity of po_slave_languages array.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 9cb047992..43804a8f2 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -141,6 +141,9 @@ sub checkconfig () { if (ref $config{po_slave_languages} eq 'ARRAY') { my %slaves; + if (@{$config{po_slave_languages}} % 2 != 0) { + error(sprintf(gettext("The %s field is invalid."), 'po_slave_languages')); + } for (my $i=0; $i<@{$config{po_slave_languages}}; $i = $i + 2) { $slaves{$config{po_slave_languages}->[$i]} = $config{po_slave_languages}->[$i + 1]; push @slavelanguages, $config{po_slave_languages}->[$i]; |