diff --git a/OpenGraph.php b/OpenGraph.php index af2e7b6..24b04a3 100644 --- a/OpenGraph.php +++ b/OpenGraph.php @@ -157,7 +157,7 @@ public function __get($key) { } if ($key === 'schema') { - foreach (self::$TYPES AS $schema => $types) { + foreach (!empty($this->_values['type']) && self::$TYPES AS $schema => $types) { if (array_search($this->_values['type'], $types)) { return $schema; }