]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
adapt for php < 5.4
authorThomas Citharel <tcit@tcit.fr>
Mon, 16 Feb 2015 15:57:16 +0000 (16:57 +0100)
committerThomas Citharel <tcit@tcit.fr>
Mon, 16 Feb 2015 15:57:16 +0000 (16:57 +0100)
Still not obsolete. :(

inc/poche/Poche.class.php

index 481382ec98665a4e8d810c6b9f44c71bca447260..9424e3ff7a7175edb603fb4c04b04e23b6c98870 100755 (executable)
@@ -395,7 +395,8 @@ class Poche
             case 'random':
                 Tools::logm('get a random article');
                 if ($this->store->getRandomId($this->user->getId())) {
-                    $id = $this->store->getRandomId($this->user->getId())[0];
+                    $id_array = $this->store->getRandomId($this->user->getId());
+                    $id = $id_array[0];
                     Tools::redirect('?view=view&id=' . $id[0]);
                     Tools::logm('got the article with id ' . $id[0]);
                 }