Permalink
Browse files

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

  • Loading branch information...
1 parent 136b61e commit 0e8c3acc351783a04577d5f1298f5d9930cc5460 @chillu chillu committed Apr 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 api/RestfulService.php
@@ -160,7 +160,8 @@ public function request($subURL = '', $method = "GET", $data = null, $headers =
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);

0 comments on commit 0e8c3ac

Please sign in to comment.