Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-03-22 23:02:44 +0300
committerGitHub <noreply@github.com>2020-03-22 23:02:44 +0300
commita4e4f3d79114080609611c9182215c546539e3af (patch)
treef33c2989d2bee90fc61b0d84451748fd70c89cd8 /plugins/SEO
parent8b9a214f640ba7df76d6c964f8bc70b39ff00e7a (diff)
Remove PHP serialization response format (#15558)
Diffstat (limited to 'plugins/SEO')
-rw-r--r--plugins/SEO/Widgets/GetRank.php7
-rw-r--r--plugins/SEO/tests/Integration/SEOTest.php6
2 files changed, 6 insertions, 7 deletions
diff --git a/plugins/SEO/Widgets/GetRank.php b/plugins/SEO/Widgets/GetRank.php
index ebc9f6eb50..16eadeb1ac 100644
--- a/plugins/SEO/Widgets/GetRank.php
+++ b/plugins/SEO/Widgets/GetRank.php
@@ -51,13 +51,12 @@ class GetRank extends \Piwik\Widget\Widget
$dataTable = API::getInstance()->getRank($url);
- /** @var \Piwik\DataTable\Renderer\Php $renderer */
- $renderer = Renderer::factory('php');
- $renderer->setSerialize(false);
+ /** @var \Piwik\DataTable\Renderer\Json $renderer */
+ $renderer = Renderer::factory('json');
return $this->renderTemplate('getRank', array(
'urlToRank' => Url::getHostFromUrl($url),
- 'ranks' => $renderer->render($dataTable)
+ 'ranks' => json_decode($renderer->render($dataTable), true)
));
}
diff --git a/plugins/SEO/tests/Integration/SEOTest.php b/plugins/SEO/tests/Integration/SEOTest.php
index 17914d1edf..178b353685 100644
--- a/plugins/SEO/tests/Integration/SEOTest.php
+++ b/plugins/SEO/tests/Integration/SEOTest.php
@@ -51,9 +51,9 @@ class SEOTest extends IntegrationTestCase
} catch(Exception $e) {
$this->markTestSkipped('A SEO http request failed, Skipping this test for now. Error was: '.$e->getMessage());
}
- $renderer = Renderer::factory('php');
- $renderer->setSerialize(false);
- $ranks = $renderer->render($dataTable);
+ $renderer = Renderer::factory('json');
+ $renderer->setTable($dataTable);
+ $ranks = json_decode($renderer->render(), true);
foreach ($ranks as $rank) {
if ($rank["id"] == "alexa") { // alexa is broken at the moment
continue;