Skip to content
Troy Davisson edited this page Mar 5, 2016 · 2 revisions

Note: This page documents capabilities available in the older 1.x version. Please see this repository's README file for the new 2.x version documentation.

Error

Error ( )

Parameters

None

Return Value

Array

Array contains 3 items:

type - Type of error. Possible types: http, xml, rets, phrets
code - Error code. If http type, contains HTTP response code. If rets type, contains RETS ReplyCode. If xml or phrets, always -1.
text - Error text. If http type, contains HTTP body from error. If rets type, contains RETS ReplyText. If xml or phrets, contains text explaining error.

Usage Examples
<?php
$error_info = $rets->Error();
if ($error_info['type'] == "rets") {
        echo "RETS error (code {$error_info['code']}): {$error_info['text']}";
}