mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 20:35:03 +02:00
issue #1575 PHP 8 compatibility, check for object type
* by using $response instanceof PwgError instead of get_class()
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user