diff options
Diffstat (limited to 'application/LinkDB.php')
-rw-r--r-- | application/LinkDB.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/application/LinkDB.php b/application/LinkDB.php index 4cee2af9..1e4d7ce8 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php | |||
@@ -144,10 +144,10 @@ class LinkDB implements Iterator, Countable, ArrayAccess | |||
144 | if (!isset($value['id']) || empty($value['url'])) { | 144 | if (!isset($value['id']) || empty($value['url'])) { |
145 | die('Internal Error: A link should always have an id and URL.'); | 145 | die('Internal Error: A link should always have an id and URL.'); |
146 | } | 146 | } |
147 | if ((! empty($offset) && ! is_int($offset)) || ! is_int($value['id'])) { | 147 | if (($offset !== null && ! is_int($offset)) || ! is_int($value['id'])) { |
148 | die('You must specify an integer as a key.'); | 148 | die('You must specify an integer as a key.'); |
149 | } | 149 | } |
150 | if (! empty($offset) && $offset !== $value['id']) { | 150 | if ($offset !== null && $offset !== $value['id']) { |
151 | die('Array offset and link ID must be equal.'); | 151 | die('Array offset and link ID must be equal.'); |
152 | } | 152 | } |
153 | 153 | ||