unexpected '[' in functions.php

I'm trying to install zenphoto.

Downloaded (2x), unzip/tar'd to a subdir on the web server, browse to http://myserver.com/zenphoto and am rewarded with a blank screen.

Logfile shows:
[Thu Jul 09 14:30:26 2015] [error] [client <redacted>] PHP Parse error: syntax error, unexpected '[' in /export/sites/www.<redacted>.com/web/zenphoto/zp-core/functions.php on line 291

Any ideas?

Comments

  • acrylian Administrator, Developer
    That line reads `$fields = [];` which is actually PHP 5.4+ syntax. So either you upgrade your server or you change that line to `$fields = array();` (We normally don't recommend to change core files so this is a quick fix with caution).

    Apparently someone forgot sometime that we actually support PHP 5.2+…
  • acrylian Administrator, Developer
    Please try the support build as it has been corrected there.
Sign In or Register to comment.