diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-28 11:22:25 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-28 11:22:25 +0200 |
commit | 557b4a2cb0ae0367e5facb1e4be136de07ab8cff (patch) | |
tree | 7381b461888007f72115309376538c42cd44a207 | |
parent | de8c15e1a46e33a20af1bad97a8cf27fced84539 (diff) | |
parent | aa2bd28a6a7f3b59eb1dd57a22e8aa4f8e1cab2c (diff) | |
download | nextcloud-server-557b4a2cb0ae0367e5facb1e4be136de07ab8cff.tar.gz nextcloud-server-557b4a2cb0ae0367e5facb1e4be136de07ab8cff.zip |
Merge pull request #15892 from owncloud/fix-failed-require-in-l10n-createjs
handle case where the given language is unknown - refs #15794
-rw-r--r-- | core/command/l10n/createjs.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/command/l10n/createjs.php b/core/command/l10n/createjs.php index 0411c2f01d9..78f3229b179 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); |