Commit e201bb49 authored by mikeytown2's avatar mikeytown2

Issue #2752507 by mikeytown2: Fix php notices with bad inputs.

parent 01582c48
......@@ -259,7 +259,7 @@ function httprl_override_core($url, $options = array()) {
// Execute request.
$request = httprl_send_request();
// Send back results.
return is_array($request) && is_string($url) && array_key_exists($url, $request) ? $request[$url] : array_pop($request);
return is_array($request) && is_string($url) && array_key_exists($url, $request) ? $request[$url] : is_array($request) ? array_pop($request) : $request;
}
/**
......@@ -1222,8 +1222,12 @@ function httprl_request($urls, $options = array()) {
drupal_alter('httprl_request', $results);
}
httprl_send_request($results);
return $return;
if (httprl_send_request($results)) {
return $return;
}
else {
return FALSE;
}
}
/**
......@@ -1247,6 +1251,9 @@ function httprl_send_request($results = NULL) {
static $static_stall_freads = FALSE;
if (!is_null($results)) {
if (empty($results)) {
return FALSE;
}
// Put the connection information into the responses array.
foreach ($results as $result) {
$responses[$counter] = $result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment