issue #1575 PHP 8 compatibility, check for object type

* by using $response instanceof PwgError instead of get_class()
This commit is contained in:
Eike Rathke authored and GitHub committed 2022-07-21 17:27:37 +02:00
1 parent 8fbc17c392
commit 8889f7ffef
4 files changed
+4 -6

No files matched your search

+1 -2
View File
@@ -49,8 +49,7 @@ class PwgXmlRpcEncoder extends PwgResponseEncoder
{
function encodeResponse($response)
{
$respClass = strtolower( @get_class($response) );
if ($respClass=='pwgerror')
if ($response instanceof PwgError)
{
$code = $response->code();
$msg = htmlspecialchars($response->message());