Support Tickets - Error #2 when running email.php

Error #2 when running email.php

HelpDesk 04.07.2016 339 Support Status: Closed Solution: Yes Netthandel

The email.php now runs longer, but it is still a bug there.

Parse error: syntax error, unexpected '[' in /home/installdomain/class/class.imap.php on line 134

Line 134 says: $emails = [];

I don't see any error there, but it is reported.

It's from this area in class.imap.php:

 * returns unseen emails in the current folder
* @return array messages
* @param $withbody without body
public function getUnreadMessages($withbody=true){
$emails = [];
$result = imap_search($this->imap, 'UNSEEN');
foreach($result as $k=>$i){
$emails[]= $this->formatMessage($i, $withbody);
return $emails;

Can you see what causes this?

Sign in to see the solution.