Skip to content

Commit a02a925

Browse files
committed
Attribute calling fixed
1 parent 9402474 commit a02a925

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/IMAP/Message.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ public function __call($method, $arguments) {
232232
if(strtolower(substr($method, 0, 3)) === 'get') {
233233
$name = snake_case(substr($method, 3));
234234

235-
if(in_array($name, $this->attributes)) {
235+
if(in_array($name, array_keys($this->attributes))) {
236236
return $this->attributes[$name];
237237
}
238238

239239
}elseif (strtolower(substr($method, 0, 3)) === 'set') {
240240
$name = snake_case(substr($method, 3));
241241

242-
if(in_array($name, $this->attributes)) {
242+
if(in_array($name, array_keys($this->attributes))) {
243243
$this->attributes[$name] = array_pop($arguments);
244244

245245
return $this->attributes[$name];

0 commit comments

Comments
 (0)