UTF8 decoding needs to be done after casting
This commit is contained in:
parent
531654724a
commit
584b988093
@ -82,8 +82,11 @@ trait EncodeUTF8
|
||||
public function getAttribute($key)
|
||||
{
|
||||
if (in_array($key,self::cast_utf8) && Arr::get($this->attributes,$key) && (! Arr::get($this->_encoded,$key))) {
|
||||
$this->attributes[$key] = utf8_decode($this->attributes[$key]);
|
||||
// We need to get it from the parent first, taking into account any casting
|
||||
$this->attributes[$key] = utf8_decode(parent::getAttribute($key));
|
||||
$this->_encoded[$key] = TRUE;
|
||||
|
||||
return $this->attributes[$key];
|
||||
}
|
||||
|
||||
return parent::getAttribute($key);
|
||||
|
Loading…
Reference in New Issue
Block a user