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,8 +10,7 @@ class PwgSerialPhpEncoder extends PwgResponseEncoder
|
||||
{
|
||||
function encodeResponse($response)
|
||||
{
|
||||
$respClass = strtolower( @get_class($response) );
|
||||
if ($respClass=='pwgerror')
|
||||
if ($response instanceof PwgError)
|
||||
{
|
||||
return serialize(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user