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
e6ead78b
Commit
e6ead78b
authored
8 years ago
by
Hanne Moa
Browse files
Options
Downloads
Patches
Plain Diff
Deprecate the use of arrays for t($tag)
For #455
parent
818d6bca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Locale/Translate.php
+5
-1
5 additions, 1 deletion
lib/SimpleSAML/Locale/Translate.php
with
5 additions
and
1 deletion
lib/SimpleSAML/Locale/Translate.php
+
5
−
1
View file @
e6ead78b
...
...
@@ -248,7 +248,7 @@ class Translate
* provided in $replacements, and replace any found occurrences with the value of the key.
*
* @param string|array $tag A tag name for the translation which should be looked up, or an array with
* (language => text) mappings.
* (language => text) mappings.
The array version will go away in 2.0
* @param array $replacements An associative array of keys that should be replaced with values in the
* translated string.
* @param boolean $fallbackdefault Default translation to use as a fallback if no valid translation was found. @deprecated Not used in twig, gettext
...
...
@@ -293,6 +293,10 @@ class Translate
if
(
is_array
(
$tag
))
{
$tagData
=
$tag
;
\SimpleSAML\Logger
::
warning
(
'Deprecated use of new SimpleSAML\Locale\Translate::t(...) at '
.
$where
.
'. The $tag-parameter can only be a string in 2.0.'
);
}
else
{
$tagData
=
$this
->
getTag
(
$tag
);
if
(
$tagData
===
null
)
{
...
...
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