diff options
author | filip <filip.komar@gmail.com> | 2016-09-18 22:58:36 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2016-09-18 22:58:36 +0200 |
commit | aaa78172d8a46be8a1c3d35da13b399027d56b8f (patch) | |
tree | f23d66ba7bd6220d5fb81898b7ae767610d2f23e /langs/report_tx_git.php | |
parent | aa5f880acd5bd293cf53a745033ef487216999be (diff) | |
download | www-aaa78172d8a46be8a1c3d35da13b399027d56b8f.tar www-aaa78172d8a46be8a1c3d35da13b399027d56b8f.tar.gz www-aaa78172d8a46be8a1c3d35da13b399027d56b8f.tar.bz2 www-aaa78172d8a46be8a1c3d35da13b399027d56b8f.tar.xz www-aaa78172d8a46be8a1c3d35da13b399027d56b8f.zip |
better handling of invalid resource
Diffstat (limited to 'langs/report_tx_git.php')
-rw-r--r-- | langs/report_tx_git.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php index c7dee5b7d..388ae2615 100644 --- a/langs/report_tx_git.php +++ b/langs/report_tx_git.php @@ -70,14 +70,15 @@ if (!empty($wanted_language) && !empty($wanted_resource_name)) { $details_wanted = TRUE; } +$parsed_tx_file_content = NULL; if ($details_wanted) { $prefixed_resource_name = resource_name_conversion($wanted_resource_name, $wanted_category); $tx_file = tx_call("resource/$prefixed_resource_name/translation/$wanted_language/"); - $tx_file_content = $tx_file['content']; - $tx_file_content = explode("\n", $tx_file_content); - $parsed_tx_file_content = phpmo_parse_po_file($tx_file_content, FALSE); -} else { - $parsed_tx_file_content = NULL; + if (!empty($tx_file)) { + $tx_file_content = $tx_file['content']; + $tx_file_content = explode("\n", $tx_file_content); + $parsed_tx_file_content = phpmo_parse_po_file($tx_file_content, FALSE); + } } // create separate array ($tx_resources_info) and add statistics to it from TX |