From e62b30c504014d8a05a2d7825ac0fd48ee48b88c Mon Sep 17 00:00:00 2001
From: Claudiu Cristea <clau.cristea@gmail.com>
Date: Mon, 18 Jul 2011 17:05:06 +0000
Subject: [PATCH 1/2] Fix some PHP 5.3 warnings.

---
 JsonRpcServer.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/JsonRpcServer.php b/JsonRpcServer.php
index 823c4b6..6c93f11 100644
--- a/JsonRpcServer.php
+++ b/JsonRpcServer.php
@@ -45,7 +45,7 @@ class JsonRpcServer{
 
     if (!isset($this->method)) { // No method found is a fatal error
       $this->error(JSONRPC_ERROR_PROCEDURE_NOT_FOUND, t("Invalid method @method", 
-        array('@method' => $request)));
+        array('@method' => $this->method_name)));
     }
     
     //If needed, check if parameters can be omitted
-- 
1.7.0.4


From 4d8e55edcf44618596fd4a5b0c61dff80e3bdcf6 Mon Sep 17 00:00:00 2001
From: Claudiu Cristea <clau.cristea@gmail.com>
Date: Mon, 18 Jul 2011 17:20:18 +0000
Subject: [PATCH 2/2] Fix some PHP 5.3 warnings.

---
 JsonRpcServer.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/JsonRpcServer.php b/JsonRpcServer.php
index 6c93f11..2ff55e0 100644
--- a/JsonRpcServer.php
+++ b/JsonRpcServer.php
@@ -28,7 +28,7 @@ class JsonRpcServer{
     $this->id = isset($in['id']) ? $in['id'] : NULL;
     $this->version = isset($in['jsonrpc']) ? $in['jsonrpc'] : '1.1';
     $this->major_version = intval(substr($this->version, 0, 1));
-    $this->params = isset($in['params']) ? $in['params'] : NULL;
+    $this->params = isset($in['params']) ? $in['params'] : array();
   }
   
   public function handle() {
@@ -49,7 +49,7 @@ class JsonRpcServer{
     }
     
     //If needed, check if parameters can be omitted
-    $arg_count = count($this->method['args']);
+    $arg_count = isset($this->method['args']) ? count($this->method['args']) : 0;
     if (!isset($this->params)) {
       for ($i=0; $i<$arg_count; $i++) {
         $arg = $this->method['#args'][$i];
-- 
1.7.0.4

