Fix tests on PHP 5.4

This commit is contained in:
Romain Neutron
2012-09-27 02:47:59 +02:00
parent c8e0f05494
commit 3f9dc687dc
15 changed files with 36 additions and 52 deletions

View File

@@ -86,7 +86,8 @@ class patch_320f implements patchInterface
continue;
}
$entry = Feed_Entry_Adapter::create($app, $feed, array_shift($feed->get_publishers()), $row['name'], $row['descript'], $user->get_display_name(), $user->get_email());
$publishers = $feed->get_publishers();
$entry = Feed_Entry_Adapter::create($app, $feed, array_shift($publishers), $row['name'], $row['descript'], $user->get_display_name(), $user->get_email());
$date_create = new DateTime($row['pub_date']);
if ($date_create < $date_ref) {
$date_ref = $date_create;
@@ -159,7 +160,8 @@ class patch_320f implements patchInterface
if ($homelink) {
$feed->set_public(true);
} elseif ($pub_restrict == 1) {
$collection = array_shift($user->ACL()->get_granted_base());
$collections = $user->ACL()->get_granted_base();
$collection = array_shift($collections);
if ( ! ($collection instanceof collection)) {
foreach ($appbox->get_databoxes() as $databox) {
foreach ($databox->get_collections() as $coll) {