I would expect integer fields such as timestamps to be cast to an int but instead a string is returned. For example:
/** @var \Drupal\aggregator\Entity\Feed $feed */
var_dump($feed->getLastCheckedTime());
// Actual: string '1411796607 ' (length=11)
// Expected: int 1411796607
I'd like to know if this is expected or whether there it's an issue? Or maybe, a link to an existing issue?
tim.plunkett pointed out that FieldItemBase::__get() calls getValue() rather than getCastedValue().
/**
* {@inheritdoc}
*/
public function __get($name) {
// There is either a property object or a plain value - possibly for a
// not-defined property. If we have a plain value, directly return it.
if (isset($this->values[$name])) {
return $this->values[$name];
}
elseif (isset($this->properties[$name])) {
return $this->properties[$name]->getValue();
}
}
Postponed: needs info
11.0 🔥
typed data system
The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.
Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.
Enhances developer experience.
To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.