Services_JSON::isError()publicWP 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.

Method of the class: Services_JSON{}

No Hooks.


null. Nothing (null).


$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.

Services_JSON::isError() code WP 6.5.4

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;