[Pkg-owncloud-commits] [owncloud] 117/215: handle case where the given language is unknown - refs #15794

David Prévot taffit at moszumanska.debian.org
Tue May 5 01:01:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 66f9811151cbc0ebba237e010aa7f81734c78b38
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Mon Apr 27 15:40:16 2015 +0200

    handle case where the given language is unknown - refs #15794
---
 core/command/l10n/createjs.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/core/command/l10n/createjs.php b/core/command/l10n/createjs.php
index 0411c2f..20ce288 100644
--- a/core/command/l10n/createjs.php
+++ b/core/command/l10n/createjs.php
@@ -28,6 +28,7 @@ use Symfony\Component\Console\Command\Command;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Output\OutputInterface;
+use UnexpectedValueException;
 
 class CreateJs extends Command {
 
@@ -126,6 +127,9 @@ class CreateJs extends Command {
 		$phpFile = "$path/l10n/$lang.php";
 		$TRANSLATIONS = array();
 		$PLURAL_FORMS = '';
+		if (!file_exists($phpFile)) {
+			throw new UnexpectedValueException("Php translation file <$phpFile> does not exist.");
+		}
 		require $phpFile;
 
 		return array($TRANSLATIONS, $PLURAL_FORMS);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list