aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/bookmark/BookmarkArray.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/bookmark/BookmarkArray.php')
-rw-r--r--application/bookmark/BookmarkArray.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/application/bookmark/BookmarkArray.php b/application/bookmark/BookmarkArray.php
index 67bb3b73..b9328116 100644
--- a/application/bookmark/BookmarkArray.php
+++ b/application/bookmark/BookmarkArray.php
@@ -72,7 +72,8 @@ class BookmarkArray implements \Iterator, \Countable, \ArrayAccess
72 */ 72 */
73 public function offsetSet($offset, $value) 73 public function offsetSet($offset, $value)
74 { 74 {
75 if (! $value instanceof Bookmark 75 if (
76 ! $value instanceof Bookmark
76 || $value->getId() === null || empty($value->getUrl()) 77 || $value->getId() === null || empty($value->getUrl())
77 || ($offset !== null && ! is_int($offset)) || ! is_int($value->getId()) 78 || ($offset !== null && ! is_int($offset)) || ! is_int($value->getId())
78 || $offset !== null && $offset !== $value->getId() 79 || $offset !== null && $offset !== $value->getId()
@@ -222,7 +223,8 @@ class BookmarkArray implements \Iterator, \Countable, \ArrayAccess
222 */ 223 */
223 public function getByUrl(string $url): ?Bookmark 224 public function getByUrl(string $url): ?Bookmark
224 { 225 {
225 if (! empty($url) 226 if (
227 ! empty($url)
226 && isset($this->urls[$url]) 228 && isset($this->urls[$url])
227 && isset($this->bookmarks[$this->urls[$url]]) 229 && isset($this->bookmarks[$this->urls[$url]])
228 ) { 230 ) {