galen / PHP-Instagram-API

PHP 5.3+ wrapper for the Instagram API
338 stars 159 forks source link

Parse syntax error Instaphp.php Line 53 #38

Open MJ1994 opened 10 years ago

MJ1994 commented 10 years ago

Hello,

I have downloaded the api, and upload the files at my server.

I opened Instaphp.php with my browser, and have the following error: Parse error: syntax error, unexpected '[' in Instaphp.php on line 53

Is that a problem in the api script? I have nothing edited, only uploaded the files.

The code on Instaphp.php line 53: private static $endpoints = [];

MJ1994 commented 10 years ago

Anyone?

Gildus commented 10 years ago

Do you have the file instaphp.php? Or have some fork?

levacic commented 10 years ago

@MJ1994 This isn't the repo you're looking for, try here: https://github.com/sesser/Instaphp

But your problem is likely that you're using PHP 5.3, while [] is new array syntax introduced in PHP 5.4 - but the other package (Instaphp) has PHP 5.4 declared as a dependency, so I'm not quite sure how you managed to even install it (unless you didn't use composer, in which case - you should use composer).

Please close this issue, as it has nothing to do with this library.