Add ObjectIssetFix Trait

This commit is contained in:
Deon George 2024-09-16 23:30:14 +10:00
parent b8a4e9d660
commit 2ab98a36d5

View File

@ -0,0 +1,15 @@
<?php
/**
* Fix for when there is a call to pluck() for values resolved via __get()
*/
namespace Leenooks\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};
}
}