From 4a0118bae6c0e2d1ad3251f8765b257c73772423 Mon Sep 17 00:00:00 2001 From: Casper Langemeijer Date: Mon, 17 Apr 2017 15:35:00 +0200 Subject: [PATCH] Refactor create_function() into anonymous function --- phpseclib/File/X509.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 74ca5ff4..7740de7c 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -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;