mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-09 03:30:06 +00:00
Code Modernization: Use instanceof instead of a comparison with get_class().
Includes adjusting external libraries which are no longer maintained externally. Props jrf. See #50767. git-svn-id: https://develop.svn.wordpress.org/trunk@49194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -918,7 +918,7 @@ class Services_JSON
|
||||
|
||||
if (class_exists('pear')) {
|
||||
return PEAR::isError($data, $code);
|
||||
} elseif (is_object($data) && (get_class($data) == 'services_json_error' ||
|
||||
} elseif (is_object($data) && ($data instanceof services_json_error ||
|
||||
is_subclass_of($data, 'services_json_error'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user