mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2025-10-10 12:28:44 -04:00
made all php unit tests pass again
This commit is contained in:
parent
59569bf9fc
commit
700f8a0ea7
11 changed files with 158 additions and 255 deletions
|
@ -190,11 +190,11 @@ class Filesystem extends AbstractData
|
|||
$comment = DataStore::get($discdir . $filename);
|
||||
$items = explode('.', $filename);
|
||||
// Add some meta information not contained in file.
|
||||
$comment->id = $items[1];
|
||||
$comment->parentid = $items[2];
|
||||
$comment['id'] = $items[1];
|
||||
$comment['parentid'] = $items[2];
|
||||
|
||||
// Store in array
|
||||
$key = $this->getOpenSlot($comments, (int) $comment->meta->postdate);
|
||||
$key = $this->getOpenSlot($comments, (int) $comment['meta']['created']);
|
||||
$comments[$key] = $comment;
|
||||
}
|
||||
}
|
||||
|
@ -283,8 +283,8 @@ class Filesystem extends AbstractData
|
|||
if ($this->exists($pasteid)) {
|
||||
$data = $this->read($pasteid);
|
||||
if (
|
||||
property_exists($data->meta, 'expire_date') &&
|
||||
$data->meta->expire_date < time()
|
||||
array_key_exists('expire_date', $data['meta']) &&
|
||||
$data['meta']['expire_date'] < time()
|
||||
) {
|
||||
$pastes[] = $pasteid;
|
||||
if (count($pastes) >= $batchsize) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue