WordPress at Your Fingertips
function is not described

Services_JSON::isError() public WP 1.0

Deprecated from version 5.3.0. It is no longer supported and can be removed in future releases. Use PHP native JSON extension instead.

{} It's a method of the class: Services_JSON{}

No Hooks.


null. Nothing.


$Services_JSON = new Services_JSON();
$Services_JSON->isError( $data, $code );
$data (required)
$code **
Default: null


Deprecated Since 5.3.0 Use the PHP native JSON extension instead.

Code of Services_JSON::isError() WP 5.8.1

function isError($data, $code = null)
    _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

    if (class_exists('pear')) {
        return PEAR::isError($data, $code);
    } elseif (is_object($data) && ($data instanceof services_json_error ||
                             is_subclass_of($data, 'services_json_error'))) {
        return true;

    return false;