From 7988f875a9fa8c19548559b28c20c29482e0a86f Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 22 Jan 2005 11:15:24 +0000 Subject: - Fixed PHP5 warning: the $result object in drupal_http_request() needed to be properly initialized using 'new StdClass'. (I just installed PHP 5.0.3, no less. Why don't you?) --- includes/common.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index bc61140e9..084bc5e1e 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -223,6 +223,8 @@ function drupal_access_denied() { * data, and redirect status. */ function drupal_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) { + $result = new StdClass(); + // Parse the URL, and make sure we can handle the schema. $uri = parse_url($url); switch ($uri['scheme']) { @@ -385,7 +387,7 @@ function fix_gpc_magic() { */ function array2object($array) { if (is_array($array)) { - $object = new stdClass(); + $object = new StdClass(); foreach ($array as $key => $value) { $object->$key = $value; } -- cgit v1.2.3