From 657edcec471ed04c3fe841481fd2b074f669cc7d Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Wed, 2 May 2012 16:49:42 -0400 Subject: [PATCH] Remove unnecessary lines. --- jsonld.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/jsonld.php b/jsonld.php index 9be185d..8f106cc 100644 --- a/jsonld.php +++ b/jsonld.php @@ -1452,14 +1452,8 @@ class JsonLdProcessor { } // if graph is not the default graph - if($name !== '') { - // add graph subject to default graph as needed - if(!property_exists($default_graph->subjects, $name)) { - $default_graph->subjects->{$name} = (object)array('@id' => $name); - } - else { - $default_graph->subjects->{$name}; - } + if($name !== '' && !property_exists($default_graph->subjects, $name)) { + $default_graph->subjects->{$name} = (object)array('@id' => $name); } // add subject to graph as needed