Error #2 when running email.php

04.07.2016 133
Assigned to: HelpDesk Option: Support Status: Closed Solution: Yes From: 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.