Fix E_NOTICE: Only variables should be passed by reference master github/master
authorChristian Weiske <cweiske@cweiske.de>
Wed, 21 Mar 2018 22:26:05 +0000 (23:26 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 21 Mar 2018 22:26:05 +0000 (23:26 +0100)
www/doap.php

index 63a66e6..aede4cb 100644 (file)
@@ -10,12 +10,14 @@ require_once 'www-header.php';
 $repo = new Repository();
 $repo->loadFromRequest();
 
+$history = $repo->getHistory();
+
 header('Content-Type: application/rdf+xml');
 render(
     'doap',
     array(
         'repo' => $repo,
-        'date' => date('Y-m-d', end($repo->getHistory())->committerTime),
+        'date' => date('Y-m-d', end($history)->committerTime),
         'link' => Tools::fullUrl($repo->getLink('display'))
     )
 );