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
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
5af5f995
Commit
5af5f995
authored
6 years ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Fix for sspmod_ class with namespaced $type
parent
03c6b6e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Module.php
+8
-10
8 additions, 10 deletions
lib/SimpleSAML/Module.php
with
8 additions
and
10 deletions
lib/SimpleSAML/Module.php
+
8
−
10
View file @
5af5f995
...
...
@@ -392,20 +392,18 @@ class Module
}
else
{
// should be a module
// make sure empty types are handled correctly
$type
=
(
empty
(
$type
))
?
'_'
:
'_'
.
$type
.
'_'
;
// check for the old-style class names
$className
=
'sspmod_'
.
$tmp
[
0
]
.
$type
.
$tmp
[
1
];
$type
=
(
empty
(
$type
))
?
'\\'
:
'\\'
.
$type
.
'\\'
;
$className
=
'SimpleSAML\\Module\\'
.
$tmp
[
0
]
.
$type
.
$tmp
[
1
];
if
(
!
class_exists
(
$className
))
{
// check for the
new
-style class names
, using namespaces
$type
=
str_replace
(
'
_
'
,
'
\\
'
,
$type
);
$
new
ClassName
=
'
SimpleSAML\\Module\\
'
.
$tmp
[
0
]
.
$type
.
$tmp
[
1
];
// check for the
old
-style class names
$type
=
str_replace
(
'
\\
'
,
'
_
'
,
$type
);
$
old
ClassName
=
'
sspmod_
'
.
$tmp
[
0
]
.
$type
.
$tmp
[
1
];
if
(
!
class_exists
(
$
new
ClassName
))
{
throw
new
\Exception
(
"Could not resolve '
$id
': no class named '
$className
' or '
$
new
ClassName
'."
);
if
(
!
class_exists
(
$
old
ClassName
))
{
throw
new
\Exception
(
"Could not resolve '
$id
': no class named '
$className
' or '
$
old
ClassName
'."
);
}
$className
=
$
new
ClassName
;
$className
=
$
old
ClassName
;
}
}
...
...
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