split up reset()['path'] to make it compatible with older PHP versions

This commit is contained in:
Bjoern Schiessle 2013-10-17 15:47:36 +02:00
parent 99738ae0bc
commit e7dc6b21c8
1 changed files with 2 additions and 1 deletions

View File

@ -132,7 +132,8 @@ class Api {
// if there are no shares than there are also no reshares // if there are no shares than there are also no reshares
if (count($shares) > 0) { if (count($shares) > 0) {
$ids = array(); $ids = array();
$path = reset($shares)['path']; $firstShare = reset($shares);
$path = $firstShare['path'];
foreach ($shares as $share) { foreach ($shares as $share) {
$ids[] = $share['id']; $ids[] = $share['id'];
} }