From 09a9b4bf6b6de9e44fd6e04acc89cd30c72887ad Sun, 5 Feb 2012 18:54:46 +0100
From: hass <hass@85918.no-reply.drupal.org>
Date: Sun, 5 Feb 2012 18:54:03 +0100
Subject: [PATCH] #1429256: Strict warning line 281: Creating default object from empty value in httprl_request()

diff --git a/httprl.module b/httprl.module
index c0e979a..465a3c2 100644
--- a/httprl.module
+++ b/httprl.module
@@ -278,7 +278,9 @@
     }
     // Convert error message to utf-8. Using ISO-8859-1 (Latin-1) as source
     // encoding could be wrong; it is a simple workaround :)
-    $response->error = drupal_convert_to_utf8($errstr, 'ISO-8859-1');
+    if (!empty($response->error) && !drupal_validate_utf8($response->error)) {
+      $response->error = drupal_convert_to_utf8($response->error, 'ISO-8859-1');
+    }
     if (!$errno) {
       // If $errno is 0, it is an indication that the error occurred
       // before the connect() call. This is most likely due to a problem
