MINOR Using SapphireInfo non-statically in RestfulService (fixes #7238)

This commit is contained in:
Ingo Schommer 2012-04-30 10:22:00 +02:00
parent 136b61eaba
commit 0e8c3acc35

View File

@ -160,7 +160,8 @@ class RestfulService extends ViewableData {
public function curlRequest($url, $method, $data = null, $headers = null, $curlOptions = array()) {
$ch = curl_init();
$timeout = 5;
$useragent = 'SilverStripe/' . SapphireInfo::Version();
$sapphireInfo = new SapphireInfo();
$useragent = 'SilverStripe/' . $sapphireInfo->Version();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);