serbanghita / Mobile-Detect

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
http://mobiledetect.net
MIT License
10.52k stars 2.67k forks source link

MD v 3.74 - PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in Mobile_Detect.php on line 245 #933

Closed dogslife closed 1 year ago

dogslife commented 1 year ago

As per title - MD v 3.74 - PHP Parse error: syntax error, unexpected 'array' (T_ARRAY), expecting function (T_FUNCTION) or const (T_CONST) in Mobile_Detect.php on line 245

Have experienced this on two separate hosting environment thus far.

serbanghita commented 1 year ago

@dogslife when running MD 3.74 you need PHP >=7.4 If that's not possible use the releases from https://github.com/serbanghita/Mobile-Detect/tree/2.8.x