Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
3326bebb
Commit
3326bebb
authored
1 year ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Fix exception when translations-file does not exist
parent
e6325267
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/simplesamlphp-changelog.md
+6
-0
6 additions, 0 deletions
docs/simplesamlphp-changelog.md
src/SimpleSAML/Locale/Localization.php
+2
-9
2 additions, 9 deletions
src/SimpleSAML/Locale/Localization.php
with
8 additions
and
9 deletions
docs/simplesamlphp-changelog.md
+
6
−
0
View file @
3326bebb
...
...
@@ -5,6 +5,12 @@
This document lists the changes between versions of SimpleSAMLphp.
See the upgrade notes for specific information about upgrading.
## Version 2.0.3
Released TBD
*
Fix exception when translation-file does not exist
## Version 2.0.2
Released 2023-03-10
...
...
This diff is collapsed.
Click to expand it.
src/SimpleSAML/Locale/Localization.php
+
2
−
9
View file @
3326bebb
...
...
@@ -18,7 +18,6 @@ use Gettext\Translator;
use
Gettext\TranslatorFunctions
;
use
SimpleSAML\Configuration
;
use
SimpleSAML\Logger
;
use
Symfony\Component\Filesystem\Filesystem
;
use
Symfony\Component\HttpFoundation\File\File
;
class
Localization
...
...
@@ -72,11 +71,6 @@ class Localization
*/
private
string
$langcode
;
/**
* @var \Symfony\Component\Filesystem\Filesystem
*/
private
Filesystem
$fileSystem
;
/**
* Constructor
...
...
@@ -85,7 +79,6 @@ class Localization
*/
public
function
__construct
(
Configuration
$configuration
)
{
$this
->
fileSystem
=
new
Filesystem
();
$this
->
configuration
=
$configuration
;
/** @var string $locales */
$locales
=
$this
->
configuration
->
resolvePath
(
'locales'
);
...
...
@@ -250,7 +243,7 @@ class Localization
}
$file
=
new
File
(
$langPath
.
$domain
.
'.po'
,
false
);
if
(
$this
->
fileSystem
->
exists
(
$file
->
getRealPath
()
)
&&
$file
->
isReadable
())
{
if
(
$file
->
getRealPath
()
!==
false
&&
$file
->
isReadable
())
{
$translations
=
(
new
PoLoader
())
->
loadFile
(
$file
->
getRealPath
());
$arrayGenerator
=
new
ArrayGenerator
();
$this
->
translator
->
addTranslations
(
...
...
@@ -268,7 +261,7 @@ class Localization
/**
* Set up L18N
if configured or fallback to old system
* Set up L18N
*/
private
function
setupL10N
():
void
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment