Modified: trunk/Sungrazr/Server/Adapter/JsonRpc.php (104 => 105)
--- trunk/Sungrazr/Server/Adapter/JsonRpc.php 2007-12-21 01:31:07 UTC (rev 104)
+++ trunk/Sungrazr/Server/Adapter/JsonRpc.php 2007-12-22 02:31:53 UTC (rev 105)
@@ -142,12 +142,24 @@
'caller' => $this
)
);
+
+ // should we return a fault immediately?
+ // Construction/setup could have failed.
+ if ($obj->isFault === true) {
+ $fault = $obj->getFault();
+ return $this->fault(
+ $fault['message'],
+ $fault['code']
+ );
+ }
+
+ // No fault during setup, so call the method
$this->result = call_user_func_array(
array($obj, $callback[1]),
$this->params
);
- // should we return a fault?
+ // should we return a fault now?
if ($obj->isFault === true) {
$fault = $obj->getFault();
return $this->fault(