1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-02 17:48:00 +01:00

Merge pull request #1115 from langemeijer/master

Refactor create_function() into anonymous function
This commit is contained in:
terrafrost 2017-04-18 00:15:03 -05:00 committed by GitHub
commit 3fe35a4976

View File

@ -1686,7 +1686,7 @@ class X509
$value = array_pop($value); // Always strip data type.
}
} elseif (is_object($value) && $value instanceof Element) {
$callback = create_function('$x', 'return "\x" . bin2hex($x[0]);');
$callback = function($x) { return '\x' . bin2hex($x[0]); };
$value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));
}
$output.= $desc . '=' . $value;