From 2ff57e973e371a4768b62bf34c428f64f89d6571 Mon Sep 17 00:00:00 2001 From: Dave Longley Date: Wed, 15 Aug 2012 15:39:55 -0400 Subject: [PATCH] Fix typo. --- jsonld.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonld.php b/jsonld.php index 8cf3019..19bc3d5 100644 --- a/jsonld.php +++ b/jsonld.php @@ -743,7 +743,8 @@ class JsonLdProcessor { * @return array all of the values for a subject's property as an array. */ public static function getValues($subject, $property) { - $rval = $subject->{$property} ?: array(); + $rval = (property_exists($subject, $property) ? + $subject->{$property} : array()); return self::arrayify($rval); }