From 55a2513471e979aa4ed9eb2374ca28bdd06897de Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 9 Nov 2018 15:42:28 +0100 Subject: [PATCH 1/1] src/Tweeper.php: silence error message when processing Instagram json Remove the "knobs" element from the Instagram json data because it contains elements with an undefined namespace which results in an error message when json is converted to XML. --- src/Tweeper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Tweeper.php b/src/Tweeper.php index 831f47d..f25ea25 100644 --- a/src/Tweeper.php +++ b/src/Tweeper.php @@ -255,6 +255,10 @@ class Tweeper { // element names, so remove it. unset($data["qe"]); + // The "knobs" object contains elements with undefined namespaces, so + // remove it to silence an error message. + unset($data["knobs"]); + $json = json_encode($data); return Tweeper::jsonToXml($json, 'instagram'); -- 2.1.4