Revert "Fix for issue #555. Avoid usage of anonymous functions for backwards compatibility with PHP versions prior to 5.3."
This reverts commit 55a8e255100c226c388192ee608d1cfa9ba72afb. git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3378 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
9ddd7dbcee
commit
201890522c
|
@ -136,24 +136,10 @@ class sspmod_core_Auth_Process_GenerateGroups extends SimpleSAML_Auth_Processing
|
|||
assert('is_string($string)');
|
||||
|
||||
return preg_replace_callback('/([^a-zA-Z0-9_@=.])/',
|
||||
'self::escapeIllegalChar',
|
||||
function ($m) { return sprintf("%%%02x", ord($m[1])); },
|
||||
$string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes a single special character.
|
||||
*
|
||||
* This function is used as a callback by escapeIllegalChars.
|
||||
*
|
||||
* @param array $matches The matches array provided by
|
||||
* preg_*() functions. $matches[0] is the complete match, while
|
||||
* $matches[1] is the specific subpattern enclosed in parenthesis
|
||||
* that triggers the match.
|
||||
*/
|
||||
private static function escapeIllegalChar($matches) {
|
||||
return sprintf("%%%02x", ord($matches[1]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Reference in New Issue