From 1e820aad7c9de3e1f053ddd462be4ef2604936ab Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 17 Jan 2010 17:37:19 -0800 Subject: [PATCH] Add a constructor to create an empty $data. Make connect static. --- client/Gallery3.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/Gallery3.php b/client/Gallery3.php index d7266b30..82b81f8f 100644 --- a/client/Gallery3.php +++ b/client/Gallery3.php @@ -28,6 +28,10 @@ class Gallery3 { var $file; var $parent; + public function __construct() { + $this->data = new stdClass(); + } + /** * Connect to a remote Gallery3 instance * @@ -36,7 +40,7 @@ class Gallery3 { * @param string password * @return object Gallery3 */ - function connect($url, $user, $pass) { + static function connect($url, $user, $pass) { $response = Gallery3_Helper::request( "post", $url, null, array("user" => $user, "password" => $pass));