Skip to content

Commit 79641ca

Browse files
committed
Use strpos instead of strstr
1 parent e3ff880 commit 79641ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Jenssegers/Mongodb/Model.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function getTable()
204204
public function getAttribute($key)
205205
{
206206
// Check if the key is an array dot notation.
207-
if (strstr($key, '.'))
207+
if (strpos($key, '.') !== false)
208208
{
209209
$attributes = array_dot($this->attributes);
210210

@@ -230,7 +230,7 @@ protected function getAttributeFromArray($key)
230230
return $this->attributes[$key];
231231
}
232232

233-
else if (strstr($key, '.'))
233+
else if (strpos($key, '.') !== false)
234234
{
235235
$attributes = array_dot($this->attributes);
236236

0 commit comments

Comments
 (0)