fightbulc / simplon_mysql

MySQL PDO Wrapper (php, mysql, pdo, crud, library)
70 stars 22 forks source link

syntax error, unexpected '?' in (...)vendor/simplon/mysql/src/Mysql.php on line 502 #13

Closed axelrindle closed 7 years ago

axelrindle commented 7 years ago

As the title says, I am getting the following error when trying to open a connection to a database:

PHP 7.0.15-0ubuntu0.16.04.4 Development Server started at Wed Mar  8 15:55:57 2017
Listening on http://localhost:8000
Document root is (...)
Press Ctrl-C to quit.
[Wed Mar  8 15:55:58 2017] PHP Parse error:  syntax error, unexpected '?' in (...)/vendor/simplon/mysql/src/Mysql.php on line 502
[Wed Mar  8 15:55:58 2017] 127.0.0.1:38532 [500]: / - syntax error, unexpected '?' in (...)/vendor/simplon/mysql/src/Mysql.php on line 502

The problem seems to be in this line: https://github.com/fightbulc/simplon_mysql/blob/2.0.0/src/Mysql.php#L502

Btw, I am using version 2.0 of your library.

Am I doing something wrong or is the source code defect?

fightbulc commented 7 years ago

Hey, I am cleaning 2.0 repo to work with php 7.1 onwards. 7.1 includes nullables which are not recognised in php 7.0.

axelrindle commented 7 years ago

So I will just update to PHP 7.1

Thanks :+1: