Use ObjectIssetFix Trait instead of defining __isset() directly

This commit is contained in:
2023-11-27 15:56:28 +11:00
parent 8590bb8acc
commit 27a3e3e24e
3 changed files with 23 additions and 30 deletions

View File

@@ -13,7 +13,7 @@ use Illuminate\Validation\Validator as ValidatorResult;
use App\Classes\FTN as FTNBase;
use App\Models\{Address,Domain,Zone};
use App\Rules\{TwoByteInteger,TwoByteIntegerWithZero};
use App\Traits\EncodeUTF8;
use App\Traits\{EncodeUTF8,ObjectIssetFix};
/**
* Class Message
@@ -24,7 +24,7 @@ use App\Traits\EncodeUTF8;
*/
class Message extends FTNBase
{
use EncodeUTF8;
use EncodeUTF8,ObjectIssetFix;
private const LOGKEY = 'FM-';
@@ -225,12 +225,6 @@ class Message extends FTNBase
$this->unknown = collect();
}
// Fix for a call to pluck('date') (which is resolved via __get()), but it returns false.
public function __isset($key)
{
return (bool)$this->{$key};
}
public function __get($key)
{
switch ($key) {