If another request is added after executing a single request, it won't run
as a single request since the first one still exists.
Sample Fix:
[code]
private function single_curl() {
$ch = curl_init();
$options = $this->get_options($this->requests[0]);
curl_setopt_array($ch,$options);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
// Remove the request from the queue and reindex
unset($this->requests[0]);
$this->requests = array_values($this->requests);
// it's not neccesary to set a callback for one-off requests
if ($this->callback) {
$callback = $this->callback;
if (is_callable($this->callback)){
call_user_func($callback, $output, $info);
}
} else {
return $output;
}
}
[/code]
Original issue reported on code.google.com by dianoga7 on 24 Feb 2010 at 5:22
Original issue reported on code.google.com by
dianoga7
on 24 Feb 2010 at 5:22