• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Community Auth for CI3 Parse error in Auth_Controller.php line 142

#1
Went through the installation process, receiving this error when I try to browse to the root.

Quote:A PHP Error was encountered
Severity: Parsing Error
Message: syntax error, unexpected '[', expecting ')'
Filename: core/Auth_Controller.php
Line Number: 142
Backtrace:

I went to the code in question at application/third_party/community_auth/core/Auth_Controller.php line 142
PHP Code:
        $this->load->library([
            
'session','tokens','Authentication'
        
])->helper([
            
'serialization','cookie'
        
])->model('auth_model'); 

The only thing I can figure is that for whatever reason php doesn't like the use of [] brackets to define the array and expects instead to see array()?  I didn't want to start modifying code that I didn't 100% understand so figured I would post the question as to how best to address this.
Thanks in advance,
Jim
Reply

#2
What version of PHP are you attempting to use this with? You must use at least PHP version 5.4.

See details:

http://php.net/manual/en/language.types.array.php
Reply

#3
(04-21-2017, 06:17 PM)skunkbad Wrote: What version of PHP are you attempting to use this with? You must use at least PHP version 5.4.

See details:

http://php.net/manual/en/language.types.array.php

Confused  I'm an idiot... I was looking at my MySQL version... not PHP.  Updated and solved!  Thanks!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.