This commit is contained in:
Daniel
2021-02-15 21:44:32 +01:00
parent c66f7d19a4
commit c58fe40fbe
21 changed files with 2254 additions and 2989 deletions

View File

@@ -13,7 +13,7 @@ class Collection extends BaseCollection {
*/
public function find($key, $default = null)
{
return array_first($this->items, function($key, $model) use ($key)
return array_first($this->items, function($key, $model)
{
return $model->getKey() == $key;

View File

@@ -51,7 +51,7 @@ class Encrypter {
*/
public function encrypt($value)
{
$iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());
$iv = @mcrypt_create_iv($this->getIvSize(), $this->getRandomizer());
$value = base64_encode($this->padAndMcrypt($value, $iv));
@@ -74,7 +74,7 @@ class Encrypter {
{
$value = $this->addPadding(serialize($value));
return mcrypt_encrypt($this->cipher, $this->key, $value, $this->mode, $iv);
return @mcrypt_encrypt($this->cipher, $this->key, $value, $this->mode, $iv);
}
/**
@@ -106,7 +106,7 @@ class Encrypter {
*/
protected function mcryptDecrypt($value, $iv)
{
return mcrypt_decrypt($this->cipher, $this->key, $value, $this->mode, $iv);
return @mcrypt_decrypt($this->cipher, $this->key, $value, $this->mode, $iv);
}
/**
@@ -216,7 +216,7 @@ class Encrypter {
*/
protected function getIvSize()
{
return mcrypt_get_iv_size($this->cipher, $this->mode);
return @mcrypt_get_iv_size($this->cipher, $this->mode);
}
/**
@@ -268,4 +268,4 @@ class Encrypter {
$this->mode = $mode;
}
}
}