1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

adapt for php < 5.4

Still not obsolete. :(
This commit is contained in:
Thomas Citharel 2015-02-16 16:57:16 +01:00
parent cdee5e6570
commit 336797f309

View file

@ -395,7 +395,8 @@ class Poche
case 'random': case 'random':
Tools::logm('get a random article'); Tools::logm('get a random article');
if ($this->store->getRandomId($this->user->getId())) { 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::redirect('?view=view&id=' . $id[0]);
Tools::logm('got the article with id ' . $id[0]); Tools::logm('got the article with id ' . $id[0]);
} }