Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added check for existence of $_SERVER['HTTP_ACCEPT'] before using it …

…(avoids warning).
  • Loading branch information...
commit d66b6e20fa2e2a7beb34d61468f6da97644d98e3 1 parent d1d77e7
dsc authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 store/ARC2_RemoteStoreEndpoint.php
View
10 store/ARC2_RemoteStoreEndpoint.php
@@ -300,8 +300,14 @@ function getResultFormat($formats, $default) {
$prefs[] = $v;
}
/* accept header */
- $vals = explode(',', $_SERVER['HTTP_ACCEPT']);
- if ($vals) {
+ if (isset($_SERVER['HTTP_ACCEPT'])) {
+ $vals = explode(',', $_SERVER['HTTP_ACCEPT']);
+ }
+ else {
+ $vals = array();
+ }
+
+ if (count($vals) > 0) {
$o_vals = array();
foreach ($vals as $val) {
if (preg_match('/(rdf\+n3|x\-turtle|rdf\+xml|sparql\-results\+xml|sparql\-results\+json|json)/', $val, $m)) {
Please sign in to comment.
Something went wrong with that request. Please try again.