From 1fee981c9c838deca1a16887cbe6219c99f1f3d6 Mon Sep 17 00:00:00 2001 From: Douglas Date: Wed, 28 Dec 2016 19:18:32 -0200 Subject: [PATCH] Update OpenGraph.php Check to see if $this->_values['type'] is set and avoid PHP Notices. --- OpenGraph.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }