You are here

public function JsonEncoder::getLastEncodingError in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Encoder/JsonEncoder.php \Symfony\Component\Serializer\Encoder\JsonEncoder::getLastEncodingError()

Returns the last encoding error (if any).

Return value

int

Deprecated

since version 2.5, to be removed in 3.0. JsonEncode throws exception if an error is found.

File

vendor/symfony/serializer/Encoder/JsonEncoder.php, line 46

Class

JsonEncoder
Encodes JSON data.

Namespace

Symfony\Component\Serializer\Encoder

Code

public function getLastEncodingError() {
  @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\\Component\\Serializer\\Encoder\\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED);
  return $this->encodingImpl
    ->getLastError();
}