Hi,

on */amp view I got following notice:
Notice: Only variables should be passed by reference in Drupal\simple_amp\Controller\AMPController->page() Line39

Here is a little fix:

 simple_amp/src/Controller/AmpController.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/simple_amp/src/Controller/AmpController.php b/simple_amp/src/Controller/AmpController.php
index 0335462..a0fc86e 100644
--- a/simple_amp/src/Controller/AmpController.php
+++ b/simple_amp/src/Controller/AmpController.php
@@ -36,7 +36,8 @@ public function page(Request $request, $entity = NULL) {
         ->parse();
       if ($this->amp->isAmpEnabled()) {
         $response = new Response();
-        $markup = $this->renderer->render($this->assembleAmpPage());
+        $pagearray = $this->assembleAmpPage();
+        $markup = $this->renderer->render($pagearray);
         $response->setContent($markup->__toString());
         return $response;
       }

Cheers

Comments

mfrosch created an issue. See original summary.

mfrosch’s picture

Issue summary: View changes
minnur’s picture

@mfrosch thanks for the report.

minnur’s picture

Version: 8.x-1.9 » 8.x-1.10
Status: Active » Fixed
minnur’s picture

Status: Fixed » Closed (fixed)