From ef5e6a909ff6703792e75e271133dbc8c10a3fcd Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 17 Jan 2020 02:12:27 -0600 Subject: [PATCH] X509: fix PHP4 errors --- phpseclib/File/X509.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index a8c88e07..2b24d471 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -2267,7 +2267,7 @@ class File_X509 return false; } - $parent = new static(); + $parent = new File_X509(); $parent->CAs = $this->CAs; /* "Conforming applications that support HTTP or FTP for accessing @@ -3000,7 +3000,7 @@ class File_X509 } elseif (is_object($value) && strtolower(get_class($value)) == 'file_asn1_element') { // @codingStandardsIgnoreStart $callback = version_compare(PHP_VERSION, '5.3.0') >= 0 ? - function ($x) { return "\x" . bin2hex($x[0]); } : + eval('return function ($x) { return "\x" . bin2hex($x[0]); };') : create_function('$x', 'return "\x" . bin2hex($x[0]);'); // @codingStandardsIgnoreEnd $value = strtoupper(preg_replace_callback('#[^\x20-\x7E]#', $callback, $value->element));