Skip to content

Commit

Permalink
remove use of like which might cause unwanted side effects (#1787)
Browse files Browse the repository at this point in the history
  • Loading branch information
luceos authored and franzliedke committed Jun 3, 2019
1 parent bd58480 commit ee3640e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Settings/DatabaseSettingsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function set($key, $value)
$query->$method(compact('key', 'value'));
}

public function delete($keyLike)
public function delete($key)
{
$this->database->table('settings')->where('key', 'like', $keyLike)->delete();
$this->database->table('settings')->where('key', $key)->delete();
}
}
2 changes: 1 addition & 1 deletion src/User/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function findByEmail($email)
*/
public function getIdForUsername($username, User $actor = null)
{
$query = User::where('username', 'like', $username);
$query = User::where('username', $username);

return $this->scopeVisibleTo($query, $actor)->value('id');
}
Expand Down

0 comments on commit ee3640e

Please sign in to comment.