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

@@ -0,0 +1,15 @@
<?php
/**
* Fix for when there is a call to pluck() for values resolved via __get()
*/
namespace App\Traits;
trait ObjectIssetFix
{
// Fix for a call to pluck('something') (which is resolved via __get()), but it returns false.
public function __isset($key)
{
return (bool)$this->{$key};
}
}