When conditionally setting title fields, etc. based on field values of objects passed into templates, the empty function will return false on a field that exists and is accessible via: $data->my_field_data
Solution
Adding the below code into the Statamic/Fields/Values class makes the above example work as expected:
public function __isset($key){ return $this->getProxiedInstance()->has($key); }
I don't know how to run tests per the recommendations for doing a pull request and adding this code into the base. Would love it if it was added.
When conditionally setting title fields, etc. based on field values of objects passed into templates, the empty function will return false on a field that exists and is accessible via:
$data->my_field_data
Example: `
`
Solution Adding the below code into the Statamic/Fields/Values class makes the above example work as expected:
public function __isset($key){ return $this->getProxiedInstance()->has($key); }
I don't know how to run tests per the recommendations for doing a pull request and adding this code into the base. Would love it if it was added.