Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

fix warning 'Parameter must be an array or an object that implements … #50

Merged
merged 1 commit into from
Dec 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/PubSubHubbub/Model/Subscription.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getSubscription($key)
.' of "' . $key . '" must be a non-empty string');
}
$result = $this->db->select(['id' => $key]);
if (count($result)) {
if ($result && count($result)) {
return $result->current()->getArrayCopy();
}
return false;
Expand All @@ -91,7 +91,7 @@ public function hasSubscription($key)
.' of "' . $key . '" must be a non-empty string');
}
$result = $this->db->select(['id' => $key]);
if (count($result)) {
if ($result && count($result)) {
return true;
}
return false;
Expand All @@ -106,7 +106,7 @@ public function hasSubscription($key)
public function deleteSubscription($key)
{
$result = $this->db->select(['id' => $key]);
if (count($result)) {
if ($result && count($result)) {
$this->db->delete(
['id' => $key]
);
Expand Down