mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
issue #1575 PHP 8 compatibility, check for object type
* by using $response instanceof PwgError instead of get_class()
This commit is contained in:
@@ -10,7 +10,7 @@ class PwgJsonEncoder extends PwgResponseEncoder
|
||||
{
|
||||
function encodeResponse($response)
|
||||
{
|
||||
if (is_object($response) and strtolower(get_class($response)) == 'pwgerror')
|
||||
if ($response instanceof PwgError)
|
||||
{
|
||||
return json_encode(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user